Allows non ancestor queries inside a transaction - #366
Conversation
the Firestore in Datastore mode allows to perform queries without an ancestor inside a transaction
…ction the new Firestore in Datastore mode allows not ancestor queries in transaction so the local datastore is changed to accept this behaviour
|
Anyway we can add a test via the local appengine datastore dev emulator? |
I also changed the emulator. The change was pretty trivial. There was a point where the code assumed there was an ancestor in a transaction context, trusting the checks done in the library, so I changed that check to separate the transaction logic and the ancestor logic. The emulator implementation remained the same. |
|
Maybe I am way off here...but doesn't this change enforce the |
As far as I know all the datastore instsances were automatically migrated to the new Firestore in Datastore mode. |
|
Thanks, just so that I have all the context, where "I also changed the emulator...." did you do the change? |
I'm talking about the local dev server contained in this project. One of the three files I've changed in this PR i about the local dev server. |
ludoch
left a comment
There was a problem hiding this comment.
Approval, but still need to wait for extra internal tests done inside Google code base.
|
We have more internal tests still using TRANSACTION_REQUIRES_ANCESTOR that are now failing, so we also need to propagate this change internally, |
|
After minor internal adaptation, this PR is now back to gh repository. |
Hello,
As stated here, the new Firestore in Datastore mode allows executing non-ancestor queries inside a transaction. The library enforces the previous behaviour, so these changes allow leveraging the new feature using the legacy bundle.
This could be useful for many people still using the legacy bundle.