Hibernate, as I know updates the Database once the attached Objects in the session's value changes. Is there a way to obtain a fresh copy from the database and reattach the fresh copy discarding the changed object?
Below is an object I obtained from Querying the Database using Hibernate.
Rtpmast rtpmast = (Rtpmast) iterator.next();
Once executed the below code
rtp.setRptval1(promotionMethod.getType());
Hibernate registers that the the object has changed. And when I commit a transaction later on or query the Database the Session is flushed?
What I want is to temporally update the Rtpmast object and discard the changed object later.