About cascade

forum_thread

Upgrade to 2.4.1_01

Hi, We tried to upgrade from 2.3.7_18 to 2.4.1_01 to pickup some fixes. We discovered that our code no longer works when using 2.4.1_01. We did some probing and found one thing. I have attached the unit test to display this issue. The problem seems to be the annotation at line 266 in the test. In our code for 2.3.7_18, we had @OneToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER), which is wrong, as Contactdetails is Embeddable, the annotation should be @Embedded. Neither annotation works with 2.4.1_01, with each giving a different error. ... in the test. In our code for 2.3.7_18, we had @OneToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER), which is wrong, as ... at com.objectdb.o.TVS.cascade(TVS.java:156) at com.objectdb.o.TVS.g(TVS.java:105) at ...

 
forum_thread

OEM licencing limitation

Hello, I have question regarding OEM licencing. We have an enhanced entity that contains list of unenhanced entities(by a mistake). We have already received the exception: Too many persistent objects (>1000000) - exceeds evaluation limit on that nonenhanced entity, but we have doubts how is the number of persistent objects counted. We unfortunately don't have the objectdb file anymore, but we have some doubts, that the number was not reached by the internal entitities.... ( fetch = FetchType . EAGER , cascade = CascadeType . ALL ) private Map vars ...

 
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

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

_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> ...