Skip to content

Conversation

gregorbg
Copy link
Contributor

What?

The PR #12763 added significant improvements for third-party databases that are compatible with the MongoDB API. While the original PR was focused on Firestore, other databases like DocumentDB also benefit from these compatibility features.

In particular, the aggregate JOIN strategy does not work on AWS DocumentDB and thus needs to be disabled. The current PR aims to provide this as a sensible default in the compatibilityOptions that are provided by Payload out-of-the-box.

As a bonus, it also fixes a small typo from compat(a)bility to compat(i)bility.

Why?

Because our Payload instance, which is backed by AWS DocumentDB, crashes upon trying to access any join field.

How?

By adding the existing useJoinAggregations with value false to the compatiblity layer. Individual developers can still choose to override it in their own local config as needed.

@gregorbg gregorbg changed the title fix(db-mongodb): Disable join aggregations in DocumentDB compatibility mode fix(db-mongodb): disable join aggregations in DocumentDB compatibility mode Jul 25, 2025
DanRibbens
DanRibbens previously approved these changes Jul 25, 2025
@DanRibbens DanRibbens enabled auto-merge (squash) July 25, 2025 13:18
auto-merge was automatically disabled July 25, 2025 13:37

Head branch was pushed to by a user without write access

@gregorbg
Copy link
Contributor Author

Thanks for the quick review @DanRibbens! Turns out, the CI found some more typos which I didn't fix. So I had to push another commit which automatically dismissed your review

@DanRibbens DanRibbens enabled auto-merge (squash) August 20, 2025 16:05
@DanRibbens DanRibbens merged commit c7b9f0f into payloadcms:main Aug 20, 2025
83 checks passed
Copy link
Contributor

🚀 This is included in version v3.53.0

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

Successfully merging this pull request may close these issues.

2 participants