Hi!
I've got a problem.
Everytime I want to change the Identifier of an object connected to a session
and want to save these changes I get the following Exception:
org.hibernate.HibernateException: identifier of an instance of 'MyObject.Class' altered from 1 to 800
But altering the Identifier from 1 to 800 is exactly what I want to do. Can anybody help me?
Code:
Code:
List myObjects = s.createCriteria(MyObject.class).list();
// this line returns MyObject with Id 1
MyObject mo = (MyObject) myObjects.get(0);
mo.setMyObjectId(800);
s.update(mo);