Background Currently, there are separate methods for insert/updating tuples and association(s) managed by the entity represented by a given tuple. This makes it tough for dialects to write out tuple change and the association change in one roundtrip to the datastore also if this would make very much sense on stores mostly of the document family where an entire object tree is stored within one document. Proposal Replace the following methods on GridDialect:
- insertOrUpdateTuple()
- insertOrUpdateAssociation()
- removeAssociation()
With a combined method which takes all the info for upsert-ing an entity and all the association(s) it embeds (either element collections or associations stored in-entity):
- upsertTupleWithAssociations()
It would receive:
- All the info on the embedding tuple
- All the info on the embedded associations (directly or nested within embeddeables)
Implementation proposal This would be driven by the existing batching engine (see attached image). |