1. hibernate delete using hql stackoverflow.comI have the following mapping in hibernate:
|
2. Problem with Hibernate HQL Delete coderanch.com |
3. HQL add works, delete doesnt coderanch.com |
4. hql delete all coderanch.com |
5. Hql delete syntax? coderanch.comI have a table named 'insurance'.Column names are ID,insurance_name,invested_amount,investment_date. Mapping object class to 'insurance' is Insurance.java.It has the required methods(setter,getter) to bind with the 'insurance' table and the instance variables are lngInsuranceId,insuranceName,investmentAmount,investmentDate. I would like to delete a row from 'insurance' table.So I have a test class to delete a row from 'insurance' table.The test class is public static void main(String[] ... |
6. HQL to delete from a collection of value objects? forum.hibernate.org |
7. How can i bolck a delete with hql? forum.hibernate.orgOn sql you can use de key ONDELETE and then you can set it on do nothing, cascade or in case there's some foreign key's block it. I'd like to know wether there is any way to set this last case on the Schema as well as you can set the cascade case. Thanks a lot! |
8. Delete using hql with cascade="all-delete-orphan" forum.hibernate.orgIMHO, you're bypassing Hibernate by using a delete query. This way, you're on your own. If you want Hibernate to take care of the relationships, I don't think you've got any way around loading the objects. But you probably don't have to load the objects in the collection as well, I think, the proxies will do just fine. |
9. cascading hql delete forum.hibernate.org |
10. HQL delete throws "dialect not supporting temp tables&q forum.hibernate.orgHibernate version:3.0.5 I am trying to delete a large number of objects (5000+) in the database using the following HQL: delete from Eval where crRights = null and modRights = null and delRights = null and mpRights = null In the HQL above the class Eval has four bidirectional relationships with four different kinds of rights instances, and these relationships are ... |
11. HQL question: deleting orphaned collection elements forum.hibernate.org
|
12. HQL delete uses temporary tables when not nescesseary forum.hibernate.orgI've just read article about bulk operations - http://blog.hibernate.org/cgi-bin/blosxom.cgi/2005/07/20 I mean that temporary tables are not nesceseary when: (a) delete by primary key (b) delete by condition from that you can derive set of primary keys to delete without data in delete table Examples: (a) delete from Human where id=10 (b) delete from Human as human where exists(select * from Order ... |
13. please,hql delete problem forum.hibernate.orgdelete from BusinessRule br where exists( from QueryEvent q inner join q.BusinessRule qbr where qbr = br.Hjid ... |
14. Can i do delete cacade in Hql? forum.hibernate.orgI run hql delete A. In A mapping i set cascade all-delete-orphan , but the hql failed (FK constraints violation ). When i delete A with session.delete it delete A and his sons. is there any option to do this with Hql? (i need to delete big amount of obj) Thank you. |
15. Which is Better -HQL or using session.delete(), update() forum.hibernate.org |
16. Problems using HQL with Cascaded Delete forum.hibernate.orgHi, I have defined a many to many relationship between two classes, viz. Event and Person (defined in a separate database table person_event). The code of these classes is listed at the end. When I tried using HQL query to delete an event, it came up with an exception. What I don't understand is that delete(event) works, but the HQL query ... |
17. Quick HQL Deletes forum.hibernate.orgThe usual information about my setup including mapping docs are at the bottom of this post. My problem is this: I have a table with a relationship to another table. I would like to delete all the rows in those two tables with are related to eachother and one more table. Using Criteria's I can quite easily get the Entry objects ... |
18. HQL delete not working with non-cascading many-to-many forum.hibernate.org |
19. Problems with deleting objects with HQL forum.hibernate.orgHibernate version: 3.2.2 Mapping documents: |
20. Hibernate fails to execute HQL Delete forum.hibernate.orgpublic static void main(String[] args) { Session s = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction t = s.beginTransaction(); t.begin(); UsuarioGrupoDAO ugDAO = new UsuarioGrupoDAO(); ugDAO.deleteByHQL("delete UsuarioGrupo usuariorGrp"+ " ... |
21. Hibernate: delete by HQL forum.hibernate.orgNewbie Joined: Wed May 24, 2006 5:47 pm Posts: 14 Hi. I have this environmet: Hibernate 3.2.6 JVM 1.4.2_12 JBoss 4.0.5 Liferay 4.3.1 I have a one-to-many relation between an entity (called Ufficio) that is the parent and another entity (called Recapito) that is the child. I have these hbm: Ufficio.hbm.xml Code: |
22. HQL Update/Delete Does Not Work the Same Way? forum.hibernate.orgThe first-level cache is tied to a single Session. If you have multiple sessions then you have multiple first-level caches as well. When a session dies, so does the first-level cache attached to it. The first level cache stores complete entities.The first-level cache grows as you load entities with the session. It doesn't have a limit on the number of objects ... |