Sorry it took a while to get this confirmed. I wound up having to do some work to my application server environment and got hung up for a bit.
Adding the @ForeignKey attribute to the column worked perfectly. For now, I'm also sticking with the operation-order update manager... performance is not a big concern of mine at the moment, I'm driving for stability under load and feel better knowing that the database operations will execute in an expected order. Thanks again for the help! -Tim Pinaki Poddar wrote: > > Hi, >> Would using the OpenJPA "ForeignKey" annotation be a sufficient work >> around for not being able to use the native schema factory? > > Good idea. Should work as well as this annotation tells OpenJPA that a > 'logical' foreign key exists. > Have not tried/tested though. Let us know if this solves your problem. > >> Also, if I use the operation-order update manager, would I need to >> explicitly insert the parent entity and child entities separately, or >> would the cascading persist work in that manner? > > The cascade will insert parent first and child later if Parent.children is > annotated with CascadeType.PERSIST/ALL. The cascading scheme and sql > ordering strategy are not aware of each other but in this case they will > be consistent. > > > -- View this message in context: http://n2.nabble.com/Inconsistent-execution-order-of-INSERT-statements-using-cascading-persist-tp678745p722018.html Sent from the OpenJPA Users mailing list archive at Nabble.com.
