ObjectDB Database Search

1-50 of 200 results

Detached Entity Objects

. Cascading Detach Marking a reference field with CascadeType . DETACH (or CascadeType . ALL , which includes DETACH ) indicates that detach operations should be cascaded automatically to entity ... field): @Entity class Employee { : @OneToOne ( cascade = CascadeType . DETACH ) private Address address

Retrieving JPA Entity Objects

of additional entity objects. By default, a retrieval operation is automatically cascaded through all the non ... , which is usually unacceptable. A persistent reference field can be excluded from this automatic cascaded ... , indicating that the retrieval operation is cascaded through the field. Explicitly specifying

Deleting JPA Entity Objects

method or implicitly as a result of a cascade operation. Explicit Remove In order to delete ... the database require an active transaction. Cascading Remove Marking a reference field with CascadeType ... should be cascaded automatically to entity objects that are referenced by that field (multiple entity objects

Storing JPA Entity Objects

or implicitly as a result of a cascade operation. Explicit Persist The following code stores ... object or alternatively by setting automatic cascading persist. Cascading Persist Marking a reference ... that persist operations should be cascaded automatically to entity objects that are referenced by

Entity Management Settings

for cascading persist operations: The always  attribute (whose value is "true" , "false" or "auto" ) specifies if persist operations should always be cascaded for every entity, regardless of local cascade settings. The "auto" value functions as "true" when using JDO and as "false" when using JPA

Cascading persistence through an inverse field

Hi! I was playing with cascading persistence with @ManyToMany and inverse @ManyToMany fields, and I noticed that I can only get cascading persistence in one direction. If the "owner ... transaction-related code to keep it simple. @Entity public class PointCollection { @ManyToMany( cascade

AnnotationAttrRef jakarta.persistence.OneToMany.cascade

JPA Annotation Attribute in jakarta.persistence.OneToMany CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. Defaults to no operations being cascaded . When the target collection is a java.util.Map , the cascade element applies to the map value. Since: JPA 1.0

AnnotationAttrRef jakarta.persistence.ManyToMany.cascade

JPA Annotation Attribute in jakarta.persistence.ManyToMany CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. When the target collection is a java.util.Map , the cascade element applies to the map value. Defaults to no operations being cascaded . Since: JPA 1.0

Cascading merge() leading to "Attempt to persist a reference to a non managed instance" error

with a parent/child relationship and cascading merge() operations. The parent has an application defined id ... ( cascade = CascadeType.ALL)     @SuppressWarnings("unused")     private ... for your assistance.   shimikano Yoshimi Takano Thank you for reporting this problem. Cascading

OneToMany and cascade delete problem

= Offer.class, mappedBy = "product", fetch = FetchType.LAZY, cascade = CascadeType.ALL) private Set offers ... , all "connected" offers are also removed ( cascade ). After that, when I iterate over offers in store ... and cascading delete from Product to Offer  are irrelevant to the exception. Let focus only in

Cascade type annotaion on an embeddable type

;a separate location cascading is not required for the embedded objects themselves. There could be some specific case in which specifying  Embedded  is needed and it is related to cascading . If the embedded object contains a reference to an entity object with cascading annotation

AnnotationAttrRef jakarta.persistence.OneToOne.cascade

JPA Annotation Attribute in jakarta.persistence.OneToOne CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded . Since: JPA 1.0

AnnotationAttrRef jakarta.persistence.ManyToOne.cascade

JPA Annotation Attribute in jakarta.persistence.ManyToOne CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded . Since: JPA 1.0

Double persist of Entity field with Cascade.ALL

bookTitle; @OneToMany( cascade = CascadeType.ALL, fetch= FetchType.EAGER) private List chapters; The Chapter ... project demonstrates a bug in cascading merge to new entity objects. A new issue was filled . 

Cascading makeTransient

. I supposed that makeTransient() should work somehow cascading even for the fields of the Entity ... is probably new). Cascading makeTransient may solve the issue, but may cause other problems (slower

Cascading delete

Is there a configuration parameter to set this? dmoshal David Moshal You can set cascade delete using annotations (see also the Orphan Removal section). JDO defines similar annotations, and both JPA ... configuration. You cannot set global cascade delete since that will be too risky - you may delete the entire database. support Support

Cascade delete with unidirectional mapping

to cascade delete of B's when deleting A? Or this should be done programatically with separate call to database? vachagan Vachagan Operations are cascaded using relationships

Memory leak while merging parent with No Cascade annotation with children

Hello support, While tracking memory leak in my application i suspected a memory leak in the merging object db implementation. The test case is the following, just run and watch the "Memory Used" by comparing Cascade .ALL (or Cascade .MERGE ) to nothing. Tested with last version of Object Db ( 

Puzzler: Not getting cascades on read from Spring context

I've determined that the database is correctly initialized, looking at it from the Object Explorer, I can run the code that loads the database in a Junit test and it's initializing the children objects correctly, but in the application running in Jetty with Spring, fetching is not cascading

Error during cascaded merge

"}),}) public class Unit implements Serializable, Comparable { ... @OneToMany(mappedBy = "unit", cascade

ObjectDB 2.6.9_06 (embedded): Cascading merge resulting in duplicate objects

This issue maybe related to issue #110 (http://www.objectdb.com/database/issue/110). Because that issue has been closed as "fixed", I am reporting this new issue. This is my class definition: @Entity public abstract class Person {     @OneToMany(fetch=FetchType.EAGER, cascade

Selective merge/cascade of detatched entity

, cascade =CascadeType.All) private Map companyTargets; } @Entity public class Company { private

Cascading (persist) with a mix of enhanced and not enhanced entities

Cascading (persist) with a mix of enhanced and not enhanced entities

JPA Entity Fields

{ @Basic ( optional =false) Integer field1; @OneToOne ( cascade = CascadeType . ALL ) MyEntity field2 ... to be thrown on any attempt to store an entity with a null value in that field. Cascade and fetch settings

Updating JPA Entity Objects

can be cascaded from all the entity objects that have to be stored in the database, including from ... . If global cascade persist is enabled all the reachable entity objects that are not managed

DELETE Queries in JPA/JPQL

 by a cascading operation. Applying changes to the database by calling the commit method. JPQL

JPA Annotations for Relationships

annotation enables configuring cascade and fetch policy, using the following enum types: Additional

I can't get cascading delete to work in JDO

I enclose a Netbeans project which demonstrates the problem.  Cascading persist works, but cascading delete does not, leaving orphan objects. sjzlondon Steve Zara Thank you for this report. Apparently cascading delete has never been implemented in ObjectDB (see also "Deleting Dependent

New entity objects are duplicated on merge cascading

When merge is cascaded to a new entity object that has not been persisted ... ;       @OneToMany( cascade = CascadeType.ALL, fetch= FetchType.EAGER ... from another new / dirty entity object by a reference with cascading persist disabled. The following

InterfaceRef jakarta.persistence.EntityManager

. Managed entities which reference the given entity continue to reference it. This operation cascades to every entity related by an association marked cascade =DETACH . If the given entity instance is new ... persistent identity. This operation cascades to every entity related by an association marked cascade

Issue with cascade delete & add/remove

of Address which cascades deletes (orphanRemoval=true) to its children which is what we want ... Entities within the collection of a Contact when we delete the Contact? Is that cascaded or do we need ... ( cascade = CascadeType.ALL, orphanRemoval = true)         private List

Sometimes cascade persist does not work during commit

Hello, sometimes our test suite runs into an unexpected behavior. The test suite persists an entity A, afterwards not persisted entities B are added to entity A. At the end a commit is executed and the commit persists the entities B automatically by cascading . But sometimes the cascading doesn't

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 be deleted. This only applies to the leaf nodes. If I add an additional the behaviour changes

EnumRef jakarta.persistence.CascadeType

.CascadeType Defines the set of cascadable operations that are propagated to the associated entity. The value cascade =ALL is equivalent to cascade ={PERSIST, MERGE, REMOVE, REFRESH, DETACH }. See Also: ManyToOne. cascade OneToOne. cascade OneToMany. cascade ManyToMany. cascade Since: JPA 1.0 Enum Constants

AnnotationRef jakarta.persistence.OneToMany

of the relationship. When the collection is a java.util.Map , the cascade element ... : // In Customer class: Since: JPA 1.0 Public Annotation Attributes CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. Defaults

AnnotationRef jakarta.persistence.ManyToMany

Public Annotation Attributes CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. When the target collection is a java.util.Map , the cascade element applies to the map value. Defaults to no operations being cascaded . Since: JPA 1.0

AnnotationRef jakarta.persistence.OneToOne

CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded . Since: JPA 1.0 FetchType fetch default ... the relationship and to cascade the remove operation to those entities. Since: JPA 2.0 Class targetEntity

AnnotationRef jakarta.persistence.ManyToOne

CascadeType [] cascade default {} (Optional) The operations that must be cascaded to the target of the association. By default no operations are cascaded . Since: JPA 1.0 FetchType fetch default FetchType.EAGER

EntityManager.merge(entity) - JPA Method

persistent identity. This operation cascades to every entity related by an association marked cascade ... , and has not been marked for removal, it is itself ignored, but the operation still cascades

EntityManager.persist(entity) - JPA Method

the effect of a previous call to remove . This operation cascades to every entity related by an association marked cascade =PERSIST . If the given entity instance is already managed ... , but the operation still cascades . Parameters: entity - a new, managed, or removed entity instance

EntityManager.remove(entity) - JPA Method

when the persistence context is synchronized with the database. This operation cascades to every entity related by an association marked cascade =REMOVE . If the given entity instance is already removed, it is ignored. If the given entity is new, it is itself ignored, but the operation still cascades . Parameters

EntityManager.refresh(entity,options) - JPA Method

. This operation cascades to every entity related by an association marked cascade =REFRESH

EntityManager.detach(entity) - JPA Method

continue to reference it. This operation cascades to every entity related by an association marked cascade

EntityManager.refresh(entity,lockMode,properties) - JPA Method

cascades to every entity related by an association marked cascade =REFRESH . If the lock mode type

EntityManager.refresh(entity,lockMode) - JPA Method

plain. This operation cascades to every entity related by an association marked cascade =REFRESH

EntityManager.refresh(entity,properties) - JPA Method

, if any. This operation cascades to every entity related by an association marked cascade =REFRESH

EntityManager.refresh(entity) - JPA Method

changes made to the entity, if any. This operation cascades to every entity related by an association marked cascade =REFRESH . Parameters: entity - a managed entity instance Throws: IllegalArgumentException

AnnotationAttrRef jakarta.persistence.OneToMany.orphanRemoval

JPA Annotation Attribute in jakarta.persistence.OneToMany boolean orphanRemoval default false (Optional) Whether to apply the remove operation to entities that have been removed from the relationship and to cascade the remove operation to those entities. Since: JPA 2.0

AnnotationAttrRef jakarta.persistence.OneToOne.orphanRemoval

JPA Annotation Attribute in jakarta.persistence.OneToOne boolean orphanRemoval default false (Optional) Whether to apply the remove operation to entities that have been removed from the relationship and to cascade the remove operation to those entities. Since: JPA 2.0

EnumConstRef jakarta.persistence.CascadeType.DETACH

JPA Enum Constant in jakarta.persistence.CascadeType DETACH Cascade the plain operation Since: JPA 2.0