About cascade

forum_thread

Attempt to refresh a non managed entity object (error 635)

Just ran into a problem that I've not seen in 10 years of running ObjectDb: java.lang.IllegalArgumentException Attempt to refresh a non managed entity object (error 635) Nothing changed in my code, but I'm wondering if there is a problem with the config file, and /or my recent experiments with Intellij's JPA database explorer, which required me to use a JPA persistence.xml configuration file. (I was able to use to run objectdb queries from inside Intellij). #1 2012-05-17 18:03 Just ran into a problem that I've not seen in 10 years of running ObjectDb: java.lang.IllegalArgumentEx ...

 
release

2.2.4

Release date: 2011-05-09 Download (5.09 MB) Binary:  objectdb-2.2.4.zip You should start by following a  tutorial or reading the manual ...

 
release

2.2.5

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

 
forum_thread

Bidirectional OneToMany is slow on updated items

Hello, I have a problem with the following situation. I insert persons with addresses. In the first run, they are all new with a new address. It runs fast. In the second run, the persons are all loaded and got a second address. This seams to be much slower. The Entities are all enhanced by the javaagent (which you can see in the contained eclipse launch configuration) Is there any way to speed it up?       ... by collections: @ OneToMany ( cascade = { CascadeType . ALL } , fetch = ...

 
forum_thread

PostUpdate collection null

Hello, I have an entity MyEntity with a collection attribute myCollection. I have an EntityListener on MyEntity with a @PostUpdate method. When I try to access myCollection from the PostUpdate method, this collection is null. If I try to access the collection from the PreUpdate method, the collection is populated. The collection is eagerly fetched. public class MyEntity {     @OneToMany(fetch=FetchType.EAGER)     private ArrayList<OtherEntity> myCollection = new ArrayList<OtherEntity>(); ... ( fetch = FetchType . EAGER , cascade = CascadeType . PERSIST ) ...

 
forum_thread

List always null

I have the following classes: @Entity public class Noticia implements Serializable {     private static final long serialVersionUID = 1L;     @Id     @GeneratedValue(strategy = GenerationType.AUTO)     private Long id;     @ManyToOne(targetEntity = Categoria.class)     private List<Categoria> categorias;   ... Noticia. class , mappedBy = "categorias" , cascade = CascadeType . PERSIST ) private ...

 
forum_thread

Relationships and tracking changes

3. Object relationship I try to create a 1->n relation (EBVerlag is 1 and EBUser is n) between two tables: Table "EBVerlag": ... ( fetch = FetchType . LAZY , cascade = CascadeType . ALL , mappedBy = "VERLAG_ID" ...

 
forum_thread

On initialisation of lists: impact on migration from EclipseLink to ObjectDB

I would like to draw the attention of those assessing migration from EclipseLink ORM to ObjectDB to a significant difference in the initialization of persistent lists, namely that EclipseLink injects a List implementation into the List field to be initialise it during EntityManager.persist(). So in EclipseLink the following works: public class HasListOfBlocks { .. ... @ OneToMany ( cascade = CascadeType . ALL ) public ...

 
forum_thread

Failed to write the value of field using reflection (error 363) on LAZY fetch

Hi There I am using ObjectDB 2.6.3. I get the following Exception when I try to read my entities with a query where I have set to use LAZY initalization. It fails when it tries to set a 1:n member (e.g. a Modell has several Artikels) . When I remove the LAZY hint on the query execution it works. Any hints why this can happen? The Mapping of class Modell and its member: ... FetchType . LAZY , mappedBy = "modell" , cascade = CascadeType . ALL ) private ...

 
issue

Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabled

Hello! When the JPA entities are not enhanced the remove of an entry from a @OneToMany collection is not possible. The following java code demonstrates the problem. The statement parentEntity.getChildEntityContainer().remove("01"); does not work with not enhanced JPA entities. ... ( fetch = FetchType . LAZY , cascade = CascadeType . ALL , orphanRemoval = true ...