Skip to content
New issue

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

fix(db-postgres): joins with versions and hasMany relationship #9370

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Nov 20, 2024

Fixes errors when having joins with versions +drafts on hasMany: true relationships.
Removes joinQuery overhead if we don't need it for the current operation. Right now, in all adapters we support joins only for find, findOne, and queryDrafts.

Fixes #9369

Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge this and continue to iterate on what we talked about. update and delete can support joins as an additional PR. For versions, since nothing is being stored on the saved document the version has no control on the join data so this is okay to omit. That is different from relationships where depth can be used and it is okay because the relationship reference is stored on the version.

@DanRibbens DanRibbens merged commit d499de1 into main Nov 21, 2024
61 checks passed
@DanRibbens DanRibbens deleted the fix/postgres-versions-has-many-joins branch November 21, 2024 15:42
Copy link
Contributor

🚀 This is included in version v3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Join field breaks when put on collection with versions
2 participants