-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
Can't flush only specific documents #1149
Comments
After some internal discussion it turned out that |
@malarzm oh wow, that's very much confusing.. http://doctrine-mongodb-odm.readthedocs.org/en/latest/reference/working-with-objects.html#flushing-single-documents Anyways - is there any way of flushing only a single document ? Maybe with the querybuilder or something ? |
@dorongutman heh yes, you're right, we need to write a disclaimer there as well... To be honest I was a bit surprised as well, but this predates my work here very much ;) Anyway right now I see two possible ways:
Also there's a chance we may diverge from ORM here and actually allow flushing only specified documents. One of main obstacles would be that current commit saves all collections BUT #1155 changes that to update collections only when their owner is updated (so outstanding things will be orphan removal and updating UoW internal state). I've marked this yesterday as an idea to allow discussion whether we want to introduce the change or not |
#1707 tracks the removal of |
I'm trying to call flush([$documentOne, $documentThree]) so it'll only flush these two documents and not others which I have not specified.
However, the ODM flushes all the documents that are pending.
Specifically, it flushes a scheduled "insert" which is a new document that's not referenced by any other document.
The text was updated successfully, but these errors were encountered: