1. Delete multiple references with session.delete(object) forum.hibernate.orgHi, i'm new with hibernate and I would like to know if it is possible delete all entries of an object with a simple delete(object) command. I explain: *I have 2 tables, Orders and Items *I have 1 order with a list of 2 items. *then I would like to get one item from Items table and execute delete(object) Result expected: ... |
2. Deleting entities with references forum.hibernate.org |
3. Save One-to-Many - Pb Delete reference but not delete record forum.hibernate.orgHibernate version: 2.1.5 Name and version of the database you are using: MaxDB Hello, I have a problem with I use SaveorUdapte of an entity with a one to many association to an other entity. Entity A (Car) : Volvo, Red,... Enitty B (Wheel) - Wheel 1 : Sport - Wheel 2 : Sport - Wheel 3 : Sport - Wheel ... |
4. Many-to-Many reference delete forum.hibernate.org |
5. Problem when deleting an object [Example from Hib reference] forum.hibernate.orgO.K. I found solution for this second error (ObjectDeletedException), an Order must be deleted from collection which contains it when deleting. But, I still getting this first error when I try to delete Order: org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1 Order is has not been deleted ! What's the problem here ... |
6. How to delete object references? forum.hibernate.orgHi! I've been having problems removing an object that has references to it. I've searched everywhere, but none of the solutions helped me. Maybe I didn't know what exactly to search for at all... Here's the problem: - Assume we have objects Foo and Bar. - Foo contains a List of Bars. Foo's mapping file is something like this: Code: |
7. How can I prevent objects/rows to reference deleted objects? forum.hibernate.org |
8. Can i delete an object based on his reference forum.hibernate.org |
9. Many-to-Many With sql-delete: Don't delete lookup references forum.hibernate.orgGreetings, I've been doing some digging through the forums to try to solve a problem we are currently having with our Hibernate configuration. We have two entities (lets say EntityA and EntityB) with a many-to-many relationship. Each entity has an |
10. de-reference before deletion=NonUniqueObjectException forum.hibernate.org// Parent parent (argument) Session session = sFac.getSession(); try { session.beginTransaction(); Query qry = session.createQuery("FROM " + Child.class.getName() + " AS child WHERE child.parent=:parent"); qry.setEntity("parent", parent); for (Child child : (List |
11. Best practice on how to delete object references forum.hibernate.org |
12. Best practice on how to delete object references forum.hibernate.orgFabian, First, you have to decide if, in your business model, it makes sense that a vehicle have no color., which will determine whether the foreign key is nullable or not in your DB. Then, you have to check if "color" is something that applies to other entities as well. Are there things other than vehicles that have color? If not, ... |
13. How to delete an entity which has a foreign key reference to forum.hibernate.orgHow to delete an entity which has a foreign key reference to it? I think it's a simple and basic question, I have a one-way @manytomany mapping user class: @ManyToMany(fetch = FetchType.EAGER) @JoinTable( name="user_role", joinColumns = { @JoinColumn( name="user_id") }, inverseJoinColumns = @JoinColumn( name="role_id") ) public Set |