Only Ancestor queries are allowed inside transactions, how to deal with it?

前端 未结 2 1444
日久生厌
日久生厌 2021-02-15 17:36

I need to do a query inside a Transaction, however I don\'t know the Entity @Id, what I have is a value of a field, like a username but not the ID,

So in o

2条回答
  •  情话喂你
    2021-02-15 18:18

    I've had a similar problem, and the simplest method I've come up with is to use one dummy parent entity. Instead of using XG transactions and inserting another Username entity for every other User entity, just create one dummy parent entity and set that as the ancestor of every User entity you create from there on. I think this method saves a lot of space and data management issues.

提交回复
热议问题