I am facing an issue, where I need to retrieve an entity two times in read-only mode to compare them ( need to have to seperate object’s from db pointing the same entity, and before comparing I make some operations on them ).
Since my JPA and Hibernate are not supporting detach() in EntityManager, and I am not able to change it to a newer version, is there any workaround for that so I would be able to fetch those two ?
Thank you in advance for your help,
P.
I have managed to achieve my goal by a workaround, using one of the features of Apache Commons library, and more precisely Common BeanUtils ( http://commons.apache.org/beanutils/ ).
It contains a way to copy the content of entity bean, which is detached, and further process without affecting the data in database.
Thank you for all help,
Regards,
P.