About remove

21-30 of 200Refresh
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.
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
Issue
17

NULL reference, how to remove

we have in our db these objects, how can we remove them (we did already a -cp Doctor):     More information is needed about this NULL reference. Can we have access to the database? What happens ... then you can use List's remove method. See also this question on stackoverflow.   hgzwicker
Forum
17

orphanRemoval = true not working when CascadeType.REMOVE is disabled

)         private Set
addresses; I'm expecting, that removing Employee from db, addresses ... try use  @OneToMany(cascade = CascadeType.REMOVE) Address entities used Employee (id=1) deleted
Forum
17

Removing entity class

into 10 entities limit. My question is: Is it possible to remove entity/table completely from ... Regards Milan Unfortunately removing a class is currently unsupported. You will have to create a new