Open ablx opened 1 year ago
We'd be happy to accept a contribution for this! Thanks!
Hey, I took a look into this. Unfortunally, this requires a change in com.google.cloud.datastore.testing.LocalDatastoreHelper (to hand over the parameter to the emulator) which is not part of the Spring Integration - and I was not able to find that class here on GitHub, so it seems it is not open source.
For everyone with the same problem: One can use Testcontainers as a workaround. See this gist: https://gist.github.com/ablx/44a47523235bf2f3a4b63a4088d7945b
For the record, LocalDatastoreHelper
is open source - https://github.com/googleapis/java-datastore/blob/main/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java.
Thanks for sharing the testcontainers option!
Great, thanks for the link. I'll implement the feature in the near future.
At the moment, the datastore emulator is not able to act as the "real" Firestore in Datastore mode. To be specific, transactions do only allow ancestor queries. The emulator itself is capable of behaving like Firestore in Datastore mode, using the argument
--use-firestore-in-datastore-mode
- but one cannot set this in Spring.Datastore Docs: https://cloud.google.com/datastore/docs/firestore-or-datastore#in_datastore_mode