                                       ["select_latest_report"]]]
 
                                     :events
-                                    ["in" "report"
-                                     ["extract" "latest_report_hash"
-                                      ["select_latest_report"]]]
+                                    ["in" "report_id"
+                                     ["extract" "latest_report_id"
+                                      ["select_latest_report_id"]]]
 
                                     (throw (IllegalArgumentException.
                                             (tru "Field 'latest_report?' not supported on endpoint ''{0}''" entity))))]

   "select_nodes" nodes-query
   "select_inactive_nodes" inactive-nodes-query
   "select_latest_report" latest-report-query
   "select_params" resource-params-query
   "select_reports" reports-query
   "select_inventory" inventory-query

                                            :field :environments.environment}
                             "latest_report?" {:type :boolean
                                               :queryable? true
                                               :query-only? true}
                             "report_id" {:type :bigint
                                          :queryable? false
                                          :query-only? true
                                          :field :events.report_id}}
               :selection {:from [[:resource_events :events]]
                           :join [:reports
                                  [:= :events.report_id :reports.id]]
