About cascade

forum_thread

Version 2.2.7 build 7/8 issue

Hi all, I have problems with builds 7 and 8 when trying to sort entities with mappedBy and my own method in query. This query "SELECT c FROM Customer c order by c.getNormalizedName()" returns List with null objects! With builds 6 and 5 works it correctly. Removing mappedBy from @OneToOne(mappedBy = "address") also helps. My code: ... name ;   @ OneToOne ( cascade = CascadeType . ALL , fetch = FetchType . ...

 
api-jpa

JPA Annotations for Relationships

Reference (JavaDoc) of JPA 2 relationship annotations, including @ManyToMany, @ManyToOne, @OneToMany, @OneToOne, @OrderBy and @MapKey.... Specifying a relationship annotation enables configuring cascade and fetch policy, using the following enum types: ...

 
forum_thread

Detaching objects after JOIN FETCH

Hi, I have a question about detaching objects after issuing query with JOIN FETCH. Let's say I have two classes: public class A { @ManyToOne B bClass } public class B { @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) List<A> aClasses; } Now, I want to fetch all B classes with all A classes skipping lazy loading: ... ( fetch = FetchType . LAZY , cascade = CascadeType . ALL ) List<A> aClasses ...

 
forum_thread

@OneToOne query issue with OR and IS NULL

Hello, I'm struggeling to get a query run right. I have 2 entities (simplified) ... OneToOne ( mappedBy = "other" , cascade = CascadeType . ALL ) private B ...

 
forum_thread

null pointer exception in objectdb-2.4.4_06

I have the following stack trace.  Is this a null ptr in our code or in the object db code? ... com.objectdb.o.TVS.j(TVS.java:169) at com.objectdb.o.TVS.cascade(TVS.java:156) at com.objectdb.o.STA.Q(STA.java:476) at ...

 
forum_thread

Help understanding Entity behavior with JPA

Hi Support,   We have a entity with an @Id entity which we then put into a list and store in an different entity inside a field defined as:   @OneToOne(orphanRemoval=true, cascade=CascadeType.ALL, fetch=FetchType.EAGER) private Object payload; ... as:   @OneToOne(orphanRemoval=true, cascade=CascadeType.ALL, fetch=FetchType.EAGER) private Object payload; ...

 
forum_thread

TemporalType injection with Calendar using JPA

I have ObjectDB  JPA  comsummed by a RESTful web service deployed on Tomcat. I am using an embedded object as a primary key, which has time fields which I have annotated with TemporalType.TIMESTAMP When I use a java.util.Date as a field on this object there is no problem. However, if I use a java.util.Calendar it encounters an exception.   Calendar is what I need.  Is there something obvious here that I am failing to see?   ...   @ OneToMany ( cascade = javax. persistence . CascadeType . ALL , fetch = ...

 
forum_thread

Weird behaviour with enhanced classes and embedded entities

Hi, I've found some weird behaviour in my project (www.tinymediamanager.org): Sometimes some entries of my ArrayLists with embedded entities are missing. I've hunted the problem down to an enhanced/proxied list in my entity which contains embedded entities and some .add(obj) are simply failing. Here is a small sscce which reproduces the issue: ... id ;   @ OneToMany ( cascade = CascadeType . ALL , fetch = FetchType . ...

 
forum_thread

_PersistenceException: Type is not found on getSingleResult.

Greetings. I'm new to ObjectDB. I'm using an ObjectDB local database for a Java SE standalone application and i'm having issues querying for an object of this entity: ... ( mappedBy = "estudiante" , cascade = CascadeType . ALL , orphanRemoval = true ...

 
forum_thread

Problem with merging / persisitng objects with @Embeddable field

Hi, After migration to version 2.4.2_01, I have noticed a strange problem with persisting object with field that contains @Embeddable object. Please check attached exception. Relation between entities looks like this: ... ( fetch = FetchType . EAGER , cascade = CascadeType . ALL ) List<ProductDemand> ...