generate « Delete « JPA Q&A





1. JPA still have a reference of a deleted Entity, hence generating Exception    stackoverflow.com

I delete entity FriendWith and create RelationShip. But the JPA still think FriendWith is there. When I deploy the EE application here is what I got in my server log.

[#|2010-11-05T14:31:51.190-0400|INFO|glassfish3.1|javax.enterprise.system.core.classloading.com.sun.enterprise.loader|_ThreadID=17;_ThreadName=Thread-1;|com.scholar.entity.<error> ...

2. can deleting a row cause its generated id to be reused?    forum.hibernate.org

Hi, I am using long ids. I have lots of interrelated tables that can infrequently be edited, deleted, and reorganized. These rows are used, when edited to generate some metadata for something like drupal nodes. It is therefore very important that an id (long), once generated, never be put back in an id pool for reuse. Are any of the id ...

3. OneToManyPersister - generating update as delete-statement    forum.hibernate.org

Hibernate version: 2.1.8 hi, i've got a one-to-many relationship between to objects, uni-directional. I've used a "set"-mapping ... On every column is a "NOT NULL"-constraint in the db. Everything works fine, loading, updating and creating a new instance. The only thing that doesn't work is deleting an instance from the set because the OneToManyPersister generates an update-statement with 'null'-values for the ...

4. Generating Cascaded Delete on Foreign Key    forum.hibernate.org

Hibernate version: version 3.0.5, 25 May 2005 Mapping documents: Code ...

5. Hibernate Session delete generates an update and delete    forum.hibernate.org

Hibernate version: 3.0 I am using optimistic concurrency with version control using timestamp with oracle 9i. When I delete a entity, hibernate generates first an update statement updating the timestamp before generating the delete statement. So basically every delete statement is accompanied by an update statment which is increasing then number of calls to the database. Can anybody has an idea ...

6. hql delete or update generates wrong sql    forum.hibernate.org

I am using Hibernate 3.2.2. Database server: Mysql Server 5.0 I have the following class structure: @Entity @Inheritance(strategy = InheritanceType.JOINED) public class A { private Long id; // getter and setter } @Entity public class B extends A { private String name; // getter and setter } When i'm trying to delete object of class B with HQL: "delete from " ...

7. Incorrect delete statement generation    forum.hibernate.org

Author Message MosheElisha Post subject: Incorrect delete statement generation Posted: Wed Apr 30, 2008 10:25 am Newbie Joined: Fri Jun 15, 2007 2:32 pm Posts: 15 I am trying to execute a delete statement on a table with a where clause that requires Hibernate to create a join. If I execute a select with the same where the query ...