Joined: Mon Nov 01, 2010 6:12 am Posts: 1
|
Once I commit the transaction, can I keep referencing the hibernate object only in read-only mode.
For example : RepositoryIntf<User> repo = new Repository<User>(User.class); Transaction tx = HibernateUtil.getTransaction(); User u = new User(); u.setLoginId("abc"); repo.save(u); tx.commit();
................. Can I continue accessing this object "u" after commit or it has a life time after which object gets destroyed automatically. ................ What would be the best way if I want take the User object "u" to view.
|
|