Skip to content

Conversation

@timgraham
Copy link
Collaborator

No description provided.

- :meth:`~django.db.models.query.QuerySet.raw` (use
:meth:`~django_mongodb_backend.queryset.MongoQuerySet.raw_aggregate`
instead)
- :meth:`~django.db.models.query.QuerySet.select_for_update` (acts as a no-op)
Copy link
Collaborator Author

@timgraham timgraham Nov 4, 2025

Choose a reason for hiding this comment

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


- :meth:`extra() <django.db.models.query.QuerySet.extra>`
- :meth:`prefetch_related() <django.db.models.query.QuerySet.prefetch_related>`
- :meth:`~django.db.models.query.QuerySet.difference`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

MongoDB has $setDifference and $setIntersection. Not sure if they could be used to emulate. @WaVEV Did this cross your radar when implementing support for union()?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I remember we talked about that, but only union was a priority at that time. I think the difference could be handled with a $lookup for the inner query (a similar flow to unionWith) followed by a $match.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I created INTPYTHON-823 Add support for QuerySet.intersection() and difference().

@timgraham timgraham merged commit 6cb3ba3 into mongodb:main Nov 7, 2025
14 checks passed
@timgraham timgraham deleted the not-supported-combinators branch November 7, 2025 00:26
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.

3 participants