We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deletedAt
Hi Tanner
Wrote this query last night:
UserOrganization.query(on: connection) .join(\Organization.id, to: \UserOrganization.organizationId) .filter(\UserOrganization.userId == id) .sort(\Organization.createdAt, .descending) .range(range) .alsoDecode(Organization.self) .all()
It returns:
SELECT * FROM "user_organization" INNER JOIN "Organization" ON "user_organization"."organizationId" = "Organization"."id" WHERE ("user_organization"."deletedAt" IS NULL OR "user_organization"."deletedAt" > ($1)) AND "user_organization"."userId" = ($2) ORDER BY "Organization"."createdAt" DESC LIMIT 1 OFFSET 5
Organization had to manually be added in .filter(\Organization.deletedAt == nil) to not return deleted organizations :)
.filter(\Organization.deletedAt == nil)
The text was updated successfully, but these errors were encountered:
This should be fixed now, thanks!
Sorry, something went wrong.
No branches or pull requests
Hi Tanner
Wrote this query last night:
It returns:
Organization had to manually be added in
.filter(\Organization.deletedAt == nil)
to not return deleted organizations :)The text was updated successfully, but these errors were encountered: