On Thu, 2011-10-13 at 06:09 -0700, Pinaki Poddar wrote:
> flush();
> 
Not following your drift. Instead of refresh()? Before commit()? Tried
both to no avail. Calling after commit(), of course, requires a new
transaction.

I should mention that my test uses a single EntityManager instance (but
not the same one across tests). That may not be typical for common
scenarios (e.g. web-container, non-jta). Even so, I did try closing and
creating a new EM and got the same results.

Like I said, I've more or less decided that setting the value
programmatically is probably the better way to go. But I can't imagine
that this is an exceptional situation (databases have had this
capability since at least the '90s) so I thought maybe there was some
annotation or property I was overlooking.


> -----
> Pinaki Poddar
> Chair, Apache OpenJPA Project
> --
> View this message in context: 
> http://openjpa.208410.n2.nabble.com/how-to-get-db-generated-values-on-persist-tp6883308p6888838.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.


Reply via email to