What I had in mind is pretty clear in my head let me try and clarify it here.
On the dialect API, add two methods prepareBatch(eventsource) and executeBatch(eventSource).
eventsource is more or less a session object but from within Hibernate ORM. You need eventsource to differentiate one batch from a concurrent batch of a different session. Remember that dialects are accessed concurrently
Each Dialect method will also receive the eventsource to properly add the operation to the right batch
prepareBatch and executeBatch should be called before and after onFlush / onAutoFlush
That means that today the Dialect will be responsible for setting operations to the right batch and be thread safe. An alternative design can be to queue change from within Hibernate OGM and then call the dialect with a Set<Operations> but let's do this design in a later phase.
Note that the dialect might return data when updating things and this might limit the batch ability but I have no real visibility just yet. Let's cross fingers.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
What I had in mind is pretty clear in my head let me try and clarify it here.
On the dialect API, add two methods prepareBatch(eventsource) and executeBatch(eventSource).
eventsource is more or less a session object but from within Hibernate ORM. You need eventsource to differentiate one batch from a concurrent batch of a different session. Remember that dialects are accessed concurrently
Each Dialect method will also receive the eventsource to properly add the operation to the right batch
prepareBatch and executeBatch should be called before and after onFlush / onAutoFlush
That means that today the Dialect will be responsible for setting operations to the right batch and be thread safe. An alternative design can be to queue change from within Hibernate OGM and then call the dialect with a Set<Operations> but let's do this design in a later phase.
Note that the dialect might return data when updating things and this might limit the batch ability but I have no real visibility just yet. Let's cross fingers.