I have a Hibernate Session and quered an Object. I then commit the transaction and end the session. I now have a detached Object. If I now start another session and transaction and need my detached object as an input parameter for another query I usually do:
session.update(<detachedObject>)
But then also an update query is triggered while my object hasn't changed. I know why Hibernate does this and I'm fine with that...
However, might it be more performant/best practice to just re-query my detached object in the new session to use as an input parameter for my query and therefore also avoid the update statement? Or does anyone has a better idea on how to implement this kind of behavior?