1. JPA - Removing entities stackoverflow.comI have a Story entity with the following associations:
|
2. JPA Adding Logic to Removing an Entity stackoverflow.comI am somewhat new to using JPA -- I'll put that out there right off the bat. I'm getting more familiar with it, but there are big holes in my knowledge ... |
3. JPA/Hibernate remove entity not working stackoverflow.comI'm using a JPA interface to Hibernate, and I've written some simple code to load an entity from the database and then remove (delete) it. All of my merge calls ... |
4. Remove only specific orphans in Hibernate? stackoverflow.comIn my app I'm using |
5. JPA/Hibernate remove all in Entity stackoverflow.comI have this Entity Class
|
6. How do I make my entity object managed so I can remove it? stackoverflow.comThis doesn't work -- I always get the IllegalArgumentException thrown with the advice to "try merging the detached and try the remove again."
|
7. (JPA) Correct way to remove entity ? coderanch.comHi! In a project a bug appeared after some "unrelated" changes and we had to add a line of code to fix it. Old code: public void removeFoo(long fooId) { // is an EJB method Foo f = entityManager.find(Foo.class, fooId); entityManager.remove(f); } New code: public void removeFoo(long fooId) { // is an EJB method Foo f = entityManager.find(Foo.class, fooId); f.getBar().getFoos().remove(f); // ... |
8. (JPA) Correct way to remove entity ? forum.hibernate.org@Entity @Table( name = "TBL_FOO" ) public class Foo implements Serializable { @ManyToOne( fetch = FetchType.EAGER ) @JoinColumn( name = "BAR_ID", nullable = false, insertable = true, updatable = true ) private Bar bar; // rest snipped } // in other file: @Entity @Table( name = "TBL_BAR" ) public class Bar implements ... |
9. Entities constructed from views - remove? forum.hibernate.org |
10. Removing entities forum.hibernate.orgI have this problem. Let's have two entities, for example Car and Person. One person can own n cars, a car can be owned by one person, so it's one-to-many association. The association is unidirectional, you can obtain owner from Code: Person Car.getOwner() , but you can't get list of cars from Person. And now here's the problem. I need to ... |
11. Saving and Entity that was removed (EntityNotFoundException) forum.hibernate.orgBeginner Joined: Thu Feb 22, 2007 6:08 am Posts: 35 Hi there! Im developing a backend with an Applet as a frontend. And i am with a problem persisting a entity. When an entity is created (new operator, that create a entity with out id, and properties are setted) on the client side, it is passed to to the servlet where ... |
12. StaleObjectStateException after removing two entities forum.hibernate.orgThe szenrio is very simple : we have two entities EntityA, EntityB with a relation (EntityA.eB <-> EntityB.eA) between them. The foreign key 'eB_id' is located at the table of EntityA. The Lock-Strategy of both Entities is Code: @org.hibernate.annotations.Entity(optimisticLock = org.hibernate.annotations.OptimisticLockType.DIRTY, dynamicUpdate = true) The initial state can be reached as follows: Code: @PersistenceContext EntityManager m; public void create() { ... |
13. Cannot remove a entity from a collection. [RESOLVED] forum.hibernate.orgWhen i try: Code: regra = grupo.getRegras().remove(i); tx = HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction(); factory.getRegraDAO().delete(regra); factory.getGrupoDAO().update(grupo); tx.commit(); I receive the follow exception: Code: Exception occurred during event dispatching: org.hibernate.exception.GenericJDBCException: could not update collection rows: [especialista.regra.Grupo.regras#1] Maps: Code: |
14. How to persist a removed entity forum.hibernate.org |