Hi, I already found the answer. The way to make OpenJPA 1.0.0. to honor the order of EM operations is to specify the following property in the persistence.xml file :
<property name="openjpa.jdbc.UpdateManager" value="operation-order"/> The doc gives no clue about the value that needs to be set. I had to ask my friend "google" to search and find the answer for me :) This is what the doc says : 2.6.18. openjpa.jdbc.UpdateManager Property name: openjpa.jdbc.UpdateManager Configuration API: org.apache.openjpa.jdbc.conf.JDBCConfiguration.getUpdateManager Resource adaptor config-property: UpdateManager Default: default Description: The full class name of the org.apache.openjpa.jdbc.kernel.UpdateManager to use to flush persistent object changes to the datastore. The provided default implementation is org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager . Pretty useless, right. Cheers, jay Jayagopi Jagadeesan phone : +358 9 453 4362 mobile : +358 40 589 2454 e-mail : [EMAIL PROTECTED] http://www.tieto-tapiola.fi Within every living soul there is a silent teacher(Conscience) > _____________________________________________ > Lähettäjä: Jagadeesan Jayagopi > Lähetetty: 21. syyskuuta 2007 16:51 > Vastaanottaja: '[email protected]' > Aihe: Persisting multiple tables > > I found that persisting multiple tables causes OpenJPA to generate INSERT > statements in a random order and hence > I get a constraint violation error due to Foreign keys being defined in the > tables. > How does one force JPA to generate SQL statements when I ask the > EntityManager to persist( em.persist() call ) instead > of it generating INSERTs in random order at commit() call time ? > Any ideas ? > > Cheers, > jay > > Jayagopi Jagadeesan > e-mail : [EMAIL PROTECTED] > http://www.tieto-tapiola.fi > Within every living soul there is a silent teacher(Conscience) >
