I'm developing an application with Hibernate + Spring mv. spring takes care of EntityManager dependency for my DAO, however I have the following problem.
- I persist an object called User
- After I run createNativeQuery with "insert into table1 (field1, field2) select field1, field2 from User"
I noticed that in table1 I was not registering the User, I checked to enable show_sql and in the console hibernate first runs the createNativeQuery after the persist, regardless of the order the two were written.
Is there any way to configure hibernate to keep the order?