How do you properly add/manipulate thousands of children in an entity group?

坚强是说给别人听的谎言 提交于 2019-11-30 16:40:12

try marking the transactions property @NotPersistent, so that it's not stored in the datastore at all. you can get the Transaction entities for a given TransactionAccount with an ancestor query (more in this thread). with that, you should be able to store arbitrarily many transactions for a given account, since they're not all stored in the account entity.

a less drastic measure would be to mark the transactions property unindexed with this annotation:

@Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true") 

the account's transactions would still be stored in the list, but they wouldn't be indexed, which would make it a bit more feasible. still, you'd hit the 1MB entity size limit around 10-100k transactions, which wouldn't be a problem if you use @NotPersistent.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!