sql « Delete « JPA Q&A





1. Cascading Deletes/Updates using JPA or Inside of Database?    stackoverflow.com

Performance is key: Is it better to cascade deletes/updates inside of the Database or let Hibernate/JPA take care of it? Will this effect the ability to query for the data if ...

2. How do I delete orphan entities using hibernate and JPA on a many-to-many relationship?    stackoverflow.com

I want to delete orphan entities using hibernate and JPA on a many-to-many relationship but all that I found was this atibute the attribute. org.hibernate.annotations.CascadeType.DELETE_ORPHAN ( i.e. @Cascade(value={org.hibernate.annotations.CascadeType.DELETE_ORPHAN) ), which works ...

3. Hibernate: Overwrite sql-delete with inheritace    stackoverflow.com

I have an entity A and B extends A and try to have a soft-delete with joined inheritance strategy.

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@SQLDelete("UPDATE A SET deleted = 1 WHERE id = ?")
A {

 ...

4. Custom SQL for create, update and delete    forum.hibernate.org

5. Execute DELETE SQL function    forum.hibernate.org

6. SQL update or deletion failed (row not found)    forum.hibernate.org

Hi all, Scenario: 1. read an object from the DB, keep it in Object1 (has a collection of sites). ok 2. read the same object from the DB, keep it in Object2. ok 3. update Object2 (triggers delete from sites...). ok 4. try to update Object1 (no site deletion), but it calls again delete from sites... and throws the exception. I ...

7. SQL update or deletion failed (row not found)    forum.hibernate.org

8. SQL update or deletion failed (row not found)    forum.hibernate.org

Login Register FAQ Search View unanswered posts | View active topics Board index Hibernate & Java Persistence Hibernate Users All times are UTC - 5 hours [ DST ] SQL update or deletion failed (row not found) Page 1 of 1 [ 4 posts ] ...





11. Bulk delete with native SQL problem    forum.hibernate.org

Okay. One more question: Is there any way to get the name of the mapped table when I have a Session object and the Class object of the mapped class? I could get a ClassMetadata object, but that does not seem not to contain the desired information. I think I have to get a PersistentClass object. Does anybody know how to ...

12. Delete objects with one step SQL command    forum.hibernate.org

13. HQL-Delete: potential limitations due to underlying SQL?    forum.hibernate.org

Newbie Joined: Tue Nov 15, 2005 1:54 pm Posts: 6 Hello, Take a look at the following code snipped (executed in Hibernate 3.1): Code: Query queryObject = session.createQuery("delete from FOO where id in (:list)"); final Long[] idObjects = new Long[ids.length]; ...

14. Delete using Native SQL not supported in H3.1!?    forum.hibernate.org

15. java.sql.BatchUpdateException: Cannot delete    forum.hibernate.org

String accounts[] = deletedAccounts.split(","); for (int i=0; i

16. Problem with delete sql    forum.hibernate.org

Hi, I need your help. I am using HibernateDaoSupport. so all the database related things i am doing using getHibernateTemplate(). method. Now i want to delete some rows from a table so instead of passing list of object i want to do it in a single query like this My SQL fro delete: Delete from Table_Name where Id =Some_value; so can ...





17. Too much parameters binded in custom sql-delete    forum.hibernate.org

Author Message jchicoineau Post subject: Too much parameters binded in custom sql-delete Posted: Thu Apr 26, 2007 10:05 am Newbie Joined: Mon Apr 23, 2007 10:06 am Posts: 6 Hi there, I've got a problem with Hibernate, related to custom sql-delete in a composite-element set. My properties' table has got five column : o : a foreign key to ...

18.     forum.hibernate.org

Hi, I am using Custom SQL as explained in section 16.3 of hibernate reference. In particular I have set up an : DELETE FROM PERSON WHERE status='EXPIRED' I have a number of issues: 1. when I hit delete the custom sql is not being invoked (the normal delete is being called instead). I expected the cutom delete to be called when ...