Populating entity id before transaction commit



I have a question about populating auto generated id before transaction commit. We are using OBD with Spring and transactions are managed by Spring. The problem is, that we have custom annotation that wraps some of those functions to do additional work. But this annotation is executed before transaction is committed so all returned entities are not populated with ID in this context. How can I force ODB to populate entity ID before transaction is committed? Or maybe there is another way to finding ID of entity before commit?

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

We are using 'Auto' strategy right now, so I have to change our strategy to sequence or table or I will try to force setting id.


Post Reply

To post a reply and/or subscribe to update notifications - please login