I have 5 MySQL InnoDB tables: Test,InputInvoice,InputLine,OutputInvoice,OutputLine
and each is mapped and functioning in Hibernate. I have played with using Sta
The final solution for me was to use voetsjoeba's response as a jumping off point. My hibernate config uses the following options:
hibernate.order_inserts = true
hibernate.order_updates = true
I changed from using Session
to
StatelessSession
Re-ordered the Java code to process all the elements in a batch a table at a time. So all of table x, then table y, etc.
Removed the
from each
class. Java now creates it and
assigns it to the object
Created logic that allowed me to determine if just an id was being set and not write 'empty' lines to the database
Finally, I turned on dynamic-insert
for my classes in their hibernate
definitions like so: