openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Generated primary key values are available in the PostPersist method ?
Date Mon, 12 Jan 2009 16:25:49 GMT

  > I observe is the PostPersist method being called with the id having
value of zero 

PostPersist callback should be invoked after persistent identity value has
been assigned. Please post the entity class, the listener class (if
@PostPersist is not on the entity class itself) and the application code
that invokes persist().

As Dinkar pointed out that OpenJPA calls back post-persist after
flush/commit and not just immediately after persist() has been called. But I
think the application should be able to configure this behavior on when
post-persist callback is invoked. 

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message