Murray B
Murray B
AEAsh Elixir
Created by barnabasj on 6/22/2023 in #support
Postgres Queries have wrong where clause
I am having an issue with the generated SQL when using a filter expression on a resource with a filter.
has_many :tasks, Bordevo.Projects.Task do
destination_attribute :id
source_attribute :resource_id
filter expr(:resource_type == "Task")
end
has_many :tasks, Bordevo.Projects.Task do
destination_attribute :id
source_attribute :resource_id
filter expr(:resource_type == "Task")
end
read :project_tasks_activity do
argument :project_id, :uuid, allow_nil?: false
filter expr(tasks.project_id == ^arg(:project_id))

end
read :project_tasks_activity do
argument :project_id, :uuid, allow_nil?: false
filter expr(tasks.project_id == ^arg(:project_id))

end
FROM "public"."tasks" AS st0 WHERE (FALSE)
FROM "public"."tasks" AS st0 WHERE (FALSE)
Does anyone know why the where (FALSE) is being generated?
63 replies