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
When an association is used in combination with preload, the paranoid repo is not checking whether the field deleted_at is not null.
The only workaround for this current problem is to use a query in preload: UserRepo.get_users!(1) |> Paranoid.preload(role: Query.from(r in Role, where: is_nil(r.deleted_at)))
Taking a look at the library code the behavior of the preload is not overridden and the default one is used:
def preload(struct_or_structs_or_nil, preloads, opts \\ []) do
unquote(repo)
|> apply(:preload, [struct_or_structs_or_nil, preloads, opts])
end
The text was updated successfully, but these errors were encountered:
When an association is used in combination with preload, the paranoid repo is not checking whether the field deleted_at is not null.
The only workaround for this current problem is to use a query in preload:
UserRepo.get_users!(1) |> Paranoid.preload(role: Query.from(r in Role, where: is_nil(r.deleted_at)))
Taking a look at the library code the behavior of the preload is not overridden and the default one is used:
The text was updated successfully, but these errors were encountered: