Code of Conduct
AI Policy
Versions
ash_sql 0.3.16
Operating system
ubuntu
Current Behavior
When the parent resource has a primary key of integer but the joined resource that is being used for the aggregate has a different type for the primary key such as an uuid it fails.
I think the reason is this line:
# lib/sort.ex:166
case AshSql.Aggregate.add_aggregates(query, used_aggregates, resource, false, 0) do # `0` instead of `binding`
This function receives binding. If I change this to binding instead of 0 the aggregate works fine in my project. Is there a reason why this is 0?
Reproduction
I could only reproduce this in a project using ash_postgres but I think this is the underlying issue.
Expected Behavior
No response
Code of Conduct
AI Policy
Versions
ash_sql 0.3.16
Operating system
ubuntu
Current Behavior
When the parent resource has a primary key of integer but the joined resource that is being used for the aggregate has a different type for the primary key such as an uuid it fails.
I think the reason is this line:
This function receives
binding. If I change this tobindinginstead of0the aggregate works fine in my project. Is there a reason why this is 0?Reproduction
I could only reproduce this in a project using ash_postgres but I think this is the underlying issue.
Expected Behavior
No response