diff --git a/app/models/application_model/can_associations.rb b/app/models/application_model/can_associations.rb index feadc3d05..d8926c0da 100644 --- a/app/models/application_model/can_associations.rb +++ b/app/models/application_model/can_associations.rb @@ -134,7 +134,7 @@ returns next if association_attributes_ignored.include?(assoc_name) eager_load.push(assoc_name) - pluck.push("#{assoc.table_name}.id") + pluck.push("#{assoc.table_name}.id AS #{assoc_name}") keys.push("#{assoc_name.to_s.singularize}_ids") end