Using:
Code:
Java 6.0
Hibernate 3.0 core
Annotations
JPA
I have the following issue:
In my app some entities have custom created IDs, that is implemented by
IdentifierGenerator interface. And I have a EntityListener configured too. This listener will persist or merge rows from a "log table", no problem at way, but my problem occours when the EntityListener try to gets id to store information at log table, but in this moment ID is not avaliable because hibernate have not raised custom ID class.
Client - an entity
CustomID - an IdentifierGenerator class implementation (generate custom ID´s)
LogTable - a class that is an EntityListener.
When I execute the app the following order appear:
- Client (some datas are filled)
- LogTable (this is the second one called)
- CustomID (the ID is called when log table was called before).
How to fix it? Thanks all for patience.