automate « Delete « JPA Q&A





1. Hibernate automatically deleting foreign key    forum.hibernate.org

Hi all, I have a problem where hibernate is automatically setting the foreign key value to null after the objects are used. It is quite bizarre. As far as I know in my code I do not set them to null at any point or delete them. I have a Search and a SearchItem object. They are used to display search ...

2. Automatically remove from collections on delete    forum.hibernate.org

I delete an object: Session s = this.factory.openSession(); Transaction tx = s.beginTransaction(); s.delete( s.get( Y.class, new Integer( yId ) ) ); tx.commit(); s.close(); And then I get something on the other side of a many to many relationship: Session s = factory.openSession(); Query q = s.createQuery( "FROM X" ); List l = q.list(); this.x = ( X ) l.get( 0 ); ...

3. Row gets deleted automatically    forum.hibernate.org

I am using Hibernate 3.0 for database MSAccess, with HXTT dialect. After I insert / update a row in table WorkTaskLog, and try to retrieve this data, it is not found and the added row gets deleted from table. Either the row completely disappears or all the fields become "#Delete". Following is my maaping:

4. cascade="delete" automatically set by reverse engi    forum.hibernate.org

...