Home » Search

About removal

21-30 of 200Refresh
Forum
17

Removing an entity throws exception

to remove customer entity, when it's read by a query (it's attached), it throws this exception ... more   After this exception is the entity detached (why?). When I merge it, I can remove it without problems ... are empty. The query: em.createQuery("select c from Customer c").getResultList(); Code for removing
Forum
17

can removing an entity throw an exception if the entity is in use?

me to remove an instance of A, even if a managed B has some reference to that A. When I then find ... to prevent the removal of the A, if it is referenced by any other object in the database? (ie. EntityManager.remove() should throw an exception.) Thanks, Carl       It is the application responsibility
Issue
17

Remove an entity which attributes were changed

and the entity is passed to plugin B. Plugin B changes an attribute on the entity. Plugin C removes ... exception of the removed entity.   If this operations on the entity are executed in only one plugin ... will be removed, if we use three OSGi plugins. The question was moved to the forum for further discussion. btc_es
Forum
17

Removing an element from an @OneToMany doesn't work

@ManyToOne private Parent parent; Somewhere I do this: parent.getChildren().remove(0 ... .commit(); But the element isn't removed. Should I remove the children entity too? It works using
Forum
17

Schema-Update: Rename superclass and remove one subclass

Hello, we renamed a superclass and removed one of the subclass. If we then try to open the Database ... SuperClass to RenamedSuperClass and Remove the ChildClassB.
Manual
17

Shared (L2) Entity Cache

can be removed from the cache by one of the evict methods: // Remove a specific entity object from the shared cache: cache.evict(MyEntity.class, Long.valueOf(id)); // Remove all the instances ... by removing all the cached entity objects: cache.evictAll(); The Cache interface and its methods are unnecessary in most applications.
Manual
17

CRUD Database Operations with JPA

a managed object (usually by retrieval) and invoke the remove method within the context of an active transaction: em.getTransaction().begin(); em.remove(p); // delete entity em.getTransaction ... object is marked for deletion by the remove method and is physically deleted from the database
Issue
17

Cascade.ALL with LAZY fetchtype does not clean up all references on remove

Hello, I have a tree of entity classes that reference others using Cascade.ALL in combination with FetchType.LAZY. If I now delete a root entity using EntityManager.remove all leaf nodes will not ... the database. If you remove the FetchType everything works. Best regards Markus Thank you for this report. Please try build 2.7.2_09. doppelrittberger
Forum
17

How do I Remove an entity from the Database ?

Hi I no longer want to use an Entity .. (in SQL terms the whole Table ) ... How do I delete it ?   Thanks Paul Newman Currently classes cannot be removed but this only affects the list of classes in the Explorer. Removing of classes will be supported in the future. pnewman
Forum
17

How to Remove records from many to many relationship tables in JPA

); entityManager.getTransaction().begin(); entityManager.remove(conclusion); entityManager ... .PERSIST, CascadeType.REMOVE}) @Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN