About removal

manual

Deleting JPA Entity Objects

Explains how to use JPA to delete (remove) entity objects from the database.... Remove Cascading Remove Orphan Removal DELETE Queries Explicit Remove ... the Address object references, if any). Orphan Removal JPA 2 supports an additional and more aggressive remove ...

 
api-jpa

remove(entity)

Remove the entity instance.(Method of javax.persistence.EntityManager)

 
manual

Working with JPA Entity Objects

Explains the entity object lifecycle and the persistence context. Entity objects are in-memory instances of entity classes (persistable user defined classes), which can represent physical objects in the database. Managing an ObjectDB Object Database using JPA requires using entity objects for many oper ...

 
manual

CRUD Database Operations with JPA

Shows how to use Java/JPA to store, retrieve, update & delete. Given an EntityManager javax.persistence.EntityManager JPA interface Interface used to interact with the persistence context. See JavaDoc Reference Page... , em , that represents a JPA connection to the object dat ...

 
manual

CRUD Operations with JPA

Explains how to use JPA for CRUD database operations (persist, retrieve, update, remove). The following subsections explain how to use JPA for CRUD database operations: Storing JPA Entity Objects Retrieving JPA Entity Objects Updating JPA Entity Objects Deleting JPA Entity Objects ...

 
api-jpa

CascadeType.REMOVE

Cascade remove operation(Enum Constant of javax.persistence.CascadeType)

 
issue

Issue with cascade delete & add/remove

Hi, Please see the attached sample project (important: classes need to be enhanced as done in the pom.xml file). ... must otherwise not depend upon a specific order of removal, and must not reassign an entity that has been orphaned to ... you should avoid adding the address again after removal. ObjectDB Support ObjectDB - Fast Object ...

 
forum_thread

Removing objects where ManyToMany relationships exist

Consider you have an entity Entity with the following unidirectional relationship: @ManyToMany private Set<OtherEntity> setOfOtherEntities; public Set<OtherEntity> getOtherEntities() {     if (setOfOtherEntities == null) {       setOfOtherEntities = new TreeSet<OtherEntity>();     }     return setOfOtherEntities;   } #1 2011-10-17 09:06 Consider you have an entity Entity with the following unidirectional relationship: @ManyToMany privat ...

 
forum_thread

Removing an entity throws exception

Hi all, I'm testing ObjectDB for my project, but I have troubles with it. At this time I'm not able to remove customer entity, when it's read by a query (it's attached), it throws this exception: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: com.objectdb.o._RollbackException: Failed to commit transaction: 51 ... #1 2011-06-08 14:02 Hi all, I'm testing ObjectDB for my project, but I have troubles with it. At this time I'm not ab ...

 
forum_thread

OrphanRemoval not working?

Dear all, I have entities Invoice and InvoiceItem, their relation is defined: public class Invoice implements Serializable { ..     @OneToMany(mappedBy = "invoice", fetch= FetchType.EAGER, orphanRemoval=true, cascade= CascadeType.ALL)     private List<InvoiceItem> invoiceItemList; .. } ... 00:45 Orphan removal was not handled by ObjectDB for inverse (mapped by) collections. ... be done on the owner side, but in the case of orphan removal the remove operation has to be done on the owned (mapped by) side to ...