Hi,
I have a problem with my code, I am trying to insert some information in the database and after that detach my object.
Basically what I am doing is:
When I use that code, nothing is inserted in the database, if I remove the "em.detach(operacion)" line it is going to work.
How can I insert the information in the database and after that detach my object??
What am I doing wrong?
Matthew Brown wrote:Try calling flush() before detaching?
Thanks, It works now.
I have a doubt, I am doing that query 2 times every 5 seconds, in this conditions do you think "flush" can affect my application performance?