Re: How to get generated keys without requerying the database?

2011-01-25 Thread Jeremy Bauer
Hi, Based on the code snippets you've provided, it looks like you my just either need to call em.flush() to force the DB update or commit the transaction before getting the recId from the dto. If that doesn't help, repost and I'll dig a little deeper. OpenJPA refreshes primary key identity

Re: How to get generated keys without requerying the database?

2011-01-25 Thread robsinner
Thanks so much for your quick response. I really appreciate it. I tried adding the em.flush after the em.persist and I am still getting the same behavior i.e. After the insert the dto.recId which is mapped to an non primary key IDENTITY column is not populated on the DTO although the REC_ID

Re: How to get generated keys without requerying the database?

2011-01-25 Thread robsinner
Kevin, Thanks for your response. I am including the full log from my junit test with TRACE turned on via openjpa.Log in persistence.xml property name=openjpa.Log value=DefaultLevel=WARN, Runtime=TRACE, Tool=INFO, SQL=TRACE/ I am using the DB2Dictionary in my persistence.xml property

Re: How to get generated keys without requerying the database?

2011-01-25 Thread robsinner
DB2 (from Control Center Help About) Product Identifier SQL09072 Level Identifier 08030107 Level DB2 v9.7.200.358 Build Level s100514 PTF IP23084 JCC Driver is db2jcc4-9.7.100.177.jar, db2jcc_license_cu-9.7.100.177.jar Thank you for your help, R S -- View this message in context:

Re: How to get generated keys without requerying the database?

2011-01-25 Thread robsinner
Jeremy (and Kevin), Thank you so much for your quick turnaround time and response and the workaround. I modified the persistence.xml with I also created a bug in JIRA- My first one so I hope that it was detailed enough. https://issues.apache.org/jira/browse/OPENJPA-1930 Thanks again, it

Re: Oracle batch insert

2011-01-25 Thread Azamat S. Kalimoulline
On Monday 24 January 2011 19:37:34 Fay Wang wrote: You might want to add the following property to your persistence.xml to enable batch execution: property name=openjpa.jdbc.DBDictionary value=batchLimit=2 / Oh Using oracle jdbc can't set batchLimit greater thatn 1000 (exception