jpa - Alternatives to EntityManager's merge() method -


I was thinking that there is a way to update other than using the merge () method, in many cases In which I need to update a field on the database, and to do this, I have to call the merge method to bring the entire object from DB with my relationships, set new values ​​and go through the modified object. It works fine, but it is causing some functionality issues, because I have to take some data from the database unnecessarily before updating. The way I see it is better to execute the update without bringing any data into memory.

Has anyone already thought about it and is an alternate and more effective way to do this?


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -