On 12/07/2011 09:33, Bengt Rodehav wrote:
Why do you think that your approach is not supported by JPA? From other
posts on this list I've seen that you are allowed to add/enrich your entity
in the PreUpdate/PreCreate callbacks. That's all you are doing right. Then
JPA persists your enriched entities.

I asked on this list a few months ago:
http://web.archiveorange.com/archive/v/tXrrxw9bXkttUykS7B6K

You can change the state of entities, but creating new entities is not permitted by the JPA spec. At the moment it does work, and I now what I'm going to do if it stops working, so I'm happy. I'd be happier if OpenJPA explicitly supported it, but it doesn't keep me awake at night.

Jim

Reply via email to