bulk « Delete « JPA Q&A





1. How to do bulk delete in JPA when using Element Collections?    stackoverflow.com

I am having trouble working out how to do a bulk delete of a Person object using JPA, when the Person objects contain data stored using an @ElementCollection. Any ideas on ...

2. Bulk deletes/updates in hibernate: best approach?    stackoverflow.com

I know in hibernate (or even in JPA?) bulk delete operations are not cascaded to related entities. Let's assume you have following entities A, B and C.
B has a ManyToOne relationship ...

3. EntityExistsException When Attempting Bulk Delete With OpenJPA    stackoverflow.com

I have three classes: Location, MTFCC, and BorderPoint. Location has a unidirectional @ManyToOne relationship with MTFCC, which is intended only as a Lookup table. No cascading is defined. Location also has a bidirectional ...

4. bulk update and delete with HQL?    forum.hibernate.org

Does Hibenate offer a way to update or delete database table rows without instanciating java class instances? Hibernate does support such a construct for bulk deletions using the Session.delete( String query ) method, but this method seems to send one sql statement per object, what is not really performant. I think, hibernate should support bulk update and delete via HQL, because ...

6. Some questions about bulk update/delete    forum.hibernate.org

i need to do bulk update and delete operations with multiple entities in "where" clause but i'm not able to do it using HQL, because of single entity restriction in update/delete operations is it possible to use bulk update/delete in NativeSQL queries? how to use it, if it is possible? i found no answer in reference and at this forum p.s. ...

7. How to write bulk delete?    forum.hibernate.org

Here is another question regarding batching: Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); int[] ids = Query q = s.createQuery("delete from MyTable where nodeNo = :nodeNo"); for (int i = 0; i < ids.length; i++ ) { q.setInteger("nodeNo", nodeNo); q.executeUpdate(); } tx.commit(); session.close(); Is this how one would write for batch delete? The ids must ...

8. N-N and bulk delete    forum.hibernate.org

Hi, i've used Hibernate 3.0.5. I have an Entity named Group that have n-n relation with itself (an group should be composed by other groups); the mapping is: Example of populing: Group g1 = ...

9. newbie question : Does bulk delete cascade?    forum.hibernate.org





10. Parse problem with bulk delete in Hibernate 3.03    forum.hibernate.org

[b]Hibernate version:3.03[/b] [b]Mapping documents: [/b] [b]Code between sessionFactory.openSession() and session.close(): Transaction tx = session.beginTransaction(); Query q = session.createQuery("delete PjmFeatureStore where pjmFeatureID=?"); q.setParameter(0, new Integer(1)); ret = q.executeUpdate(); tx.commit(); [/b] [b]Full stack trace of any ...

11. bulk delete problem    forum.hibernate.org

I didn't think spring 1.1 worked with hibernate 3.x. I thought you had to use atleast Spring 1.24. The Spring hibernate template might be pointing to net.sf.hibernate.* instead of org.hibernate.* if I am mistaken and it is, try writing a more verbose hql statement to see if that works. like "delete from Class where id=:watever"

12. Problem with temporary table / bulk-delete on MS-SQL Server    forum.hibernate.org

Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message ender74 Post subject: Problem with temporary table / bulk-delete on MS-SQL Server Posted: Wed May 10, 2006 10:04 am Newbie Joined: Wed Aug 31, 2005 2:29 am Posts: 8 Hi, I do have a problem with ...

13. HQL Bulk deletion basics    forum.hibernate.org

Some questions to understand the HQL bulk update/delete mechanism 1. Can I pass the Object name and the table name (in case they are not the same) in the FROM clause of DELETE queries ? 2. Is cascading is being triggered when deleting entry using the HQL delete query ? 3. Are the entries in the join tables get deleted as ...

14. Bulk delete for a set without one-to-many relationship    forum.hibernate.org

Hibernate version: 3.2.4 Database: Oracle 10 Mapping document: Code: ...

15. Bulk Deletes of Many to Many Relationships    forum.hibernate.org

I have a data model with several many to many relationships where the join table is maintained entirely by Hibernate (i.e., it has not exposed as an object in my object model). Now, I am trying to perform some bulk delete operations using HQL. The problem is that I cannot figure out how to delete the relationships. I don't have an ...

16. Bulk delete - conceptual question    forum.hibernate.org

Would like to understand at a high level how the bulk delete in Hibernate (assume latest version of the code) is implemented. I just want to make sure we're using Hibernate the way it is intended. I don't believe this is spelled out in the doc as clearly as I would like, but apologies in advance if it is and I ...





17. Deleting bulk records from history tables using hibernate?    forum.hibernate.org

I have a requirement of deleting bulk records from some history tables. The table information from which the records has to be deleted will be kept in a temp table. The records in the history tables are in millions for which I want to delete them in batches so that the delete operation dont fill up the log space in the ...

18. bulk delete and cascading problem    forum.hibernate.org

Hy there. I really need your help. I read many posts here and tried a lot of things for several hours now, but it seems I can't solve my problem, even if it appears to be quite simple compared to other problems discussed here (regarding cascading bulk delete) . My problem is to bulk delete many objects at once, that have ...

19. Problem with deleting bulk of records in MS Sql server.    forum.hibernate.org

Hi all, From application, I have a collection of objects where i am trying to delete object by object by checking some condition. Suppose there are more than 100 objects in loop, every time it has to go to DB server and delete each object, so a lot of trips. The problem is, application is getting stuck after deleting all, probably ...

20. Unable to do bulk delete    forum.hibernate.org