3
I’m developing an application with Hibernate + Spring mv. spring takes care of the Entitymanager dependency for my DAO, but I have the following problem.
- i persist an object called User
- then I run createNativeQuery with "Insert into Tabela1 (field1, field2) select field1, field2 from User"
with that I noticed that in Tabela1 was not registering the User, I checked enabling show_sql and in the console Hibernate first executes the createNativeQuery then persists, regardless of the order that the two were written.
Is there any way to configure Hibernate to keep order?
Could you put the code in the question to look at? : ) Also include show_sql output
– Dherik