This content has been marked as final.
Show 2 replies
-
1. Re: getPreviousInstance() from EntityHome
monkeyden Jan 27, 2011 11:29 AM (in response to vata2999)It's still the same instance so modifications to the object's properties will still be seen. You likely have to copy it, which can be cumbersome with an object graph.
-
2. Re: getPreviousInstance() from EntityHome
vata2999 Jan 28, 2011 4:42 AM (in response to vata2999)I face sth wierd even after i load entity from database all the object value bind to new
instance@End public String update(){ MadeLicense prevMl = (MadeLicense)getEntityManager().createQuery("from MadeLicense ml where mlid = :mlid") .setParameter("mlid",getIstance().getId()).getSingleResult(); // this return new instance MadeLicenseLog mlLog = new MadeLicenseLog(); BeanUtils.copyPropeties(prevMl, mlLog); super.updated(); }