You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Here I make use of relation dataset to model different types of a task. In UserRepo I want a fetch all users having undone tasks and I want to load them with their undone tasks. The issue is that join with undone_tasks relation doesn't build a SQL query with the filters from undone_tasks dataset.
Have the same issue with joins.
Кузкщвгсфиду example can be minimised to:
class Users < ROM::Relation[:sql]
schema(infer: true) do
associations do
has_many :undone_tasks
end
end
end
class UndoneTasks < ROM::Relation[:sql]
schema(:tasks, infer: true) do
associations { belongs_to :user }
end
dataset { where(done: false).order(:created_at).qualify }
end
users.join(undone_tasks) # dataset condition is ignored
Is there any workaround or recommended approach on how to handle such use-cases?
Hi! Here I make use of relation dataset to model different types of a task. In
UserRepo
I want a fetch all users having undone tasks and I want to load them with their undone tasks. The issue is thatjoin
withundone_tasks
relation doesn't build a SQL query with the filters fromundone_tasks
dataset.The text was updated successfully, but these errors were encountered: