About cascade

issue

objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active'

objectdb-2.6.9_01 NetBeans8.1+Glassfish4.1.1 Mac OS X Possibly related: How to Use a SF with extended Persistence Context? Test mini web app at: https://www.webel.com.au/downloads/objectdb/GreensoftObjectdbTestWebMini3683.2016-09-29.tgz Bug Version: Priority: Normal Status: Active Replies: 3 Type:  Bug ...

 
forum_thread

Is it possible to remove parent/child entities without refresh?

We have a big object tree in our project. If I use the entityManage.remove method a entityManager.refresh is necessary in order to have an updated object tree in memory. But entityManager.refresh is too slow for our project. Do you know a possibilty to remove parent/child entities without entityManager.refresh after the entityManager.remove operation? I have searched for a solution with the following unit test (See testRemoveVariant2()). But my approach works correctly. Do you have an idea? ... ( fetch = FetchType . LAZY , cascade = CascadeType . ALL , mappedBy = "parent" , ... ( fetch = FetchType . LAZY , cascade = { CascadeType . PERSIST , CascadeType ...

 
forum_thread

ObjectDB Explorer don't show ManyToOne relations

Hello support. we have a problem with the ObjectDB Explorer and @ManyToOne relations. We persist the entity FolderImpl that has an attribute of type ModelElement. If we use an interface for the attribute then the ObjectDB Explorer shows NULL for the attribute although our unit test checks that the attribute is not NULL in the database. @Entity public class ModelElementImpl implements ModelElement { ... } @Entity public class FolderImpl { ... targetEntity = ModelElementImpl. class , cascade = { CascadeType . REFRESH } ) ... targetEntity = ModelElementImpl. class , cascade = { CascadeType . REFRESH } ) ...

 
forum_thread

Lazy loading does not work - crud takes long

tomee7.0.0SNAPSHOT,objectdb 2.6.4 The OneToMany Entities are filled with 40.000 Records and they have between 20-40 Columns. It takes over 50s to load all Project Enities that contains the OneToMany Relationships. It should be load lazy but i didnt know why the query fetch all the Data. ... id ; .. .. @ OneToMany ( cascade = CascadeType . ALL , orphanRemoval = true , ... datapoint ;   @ OneToMany ( cascade = CascadeType . ALL , orphanRemoval = true , ...

 
api-jpa

OneToMany.orphanRemoval

(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.(Annotation Element of javax.persistence.OneToMany)

 
forum_thread

Global way to set Lazy-loading fetch functionality for all the fields

Hi, for cascading persist, I have 3 choices: - Either locally (@OneToOne(cascade=CascadeType.PERSIST)) - Either at objectdb level (<cascade-persist always="auto" on-persist="false" on-commit="true" />) - Either at JPA global level (orm.xml).   For defining fetch policy, I know the local way to do it (@ManyToOne(fetch=FetchType.LAZY)). Is there any way to do it at objectdb level or JPA global level?   ... I have 3 choices: - Either locally (@OneToOne(cascade=CascadeType.PERSIST)) - Either at objectdb level (<cascade-persist always="auto" on-persist="false" on-commit="true" />) ...

 
forum_thread

Object explorer cannot open odb file. ObjectDB many-to-many relationship

I created a data model to test many-to-many relationship with a link table as following (full code in attachement) ... @ Id @ ManyToOne ( cascade = CascadeType . ALL , optional = false ... @ Id @ ManyToOne ( cascade = CascadeType . ALL , optional = false ...

 
forum_thread

Merge on detached entities

Hello, it is possible to merge detached entities? There are some attached entities which load from the database. The transaction is finished and the entities become detached. In a new transaction the fields of the detached entities will be changed and a merge by em.merge(entity) will be saved the entities. Can this works correctly? How are the rules of the merge process? Do the changed fields of the detached entity overwrite the fields in the database? Also changed fields which are set to null? ... - but just because that collection was not yet loaded. The cascade type for this reference was set to ALL. Then we tried to merge that ...

 
forum_thread

Some details about db behavior

Suppose I have two entities... A B -> A B has a ManyToOne relationship with A. When my database is empty and I persist a valid B entity (that contains actual A reference) I observe some behaviour that I'm not sure I understand. ... it. Please explain what is happening there? I know about cascade option, and if I use it A will be persisted under A type... but is B ...

 
release

2.4.0

Release date: 2012-05-20 Download (5.4 MB) Binary:  objectdb-2.4.0.zip You should start by following a  tutorial or reading the manual ...