Joined: Wed Oct 14, 2009 5:10 pm Posts: 2
|
I am facing a strange scenario where the Java hibernate wipes out / deletes the previously stored data in the database table when you restart the program. In the same running session, it works fine. The thing is why it should wipe out even when primary key is in place? I am committing the data too in class files.
<id name="id"> <generator class="increment"></generator>
</id>
-------------
Transaction tx = null; Session session = SessionFactoryUtil.getInstance().getCurrentSession(); try { tx = session.beginTransaction(); session.saveOrUpdate(obj1); // session.save(icall); tx.commit();
}
Above 'id' is primary key in the table. Any help would be appreciated.
|
|