About fetch

release

2.2.2

... . Fixed several bugs in handling eager fetch. Fixed a pessimistic locking bug . ...

 
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. ... for 2.3.7_18, we had @OneToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER), which is wrong, as Contactdetails is Embeddable, the ...

 
forum_thread

OrphanRemoval not working?

Dear all, I have entities Invoice and InvoiceItem, their relation is defined: public class Invoice implements Serializable { ..     @OneToMany(mappedBy = "invoice", fetch= FetchType.EAGER, orphanRemoval=true, cascade= CascadeType.ALL)     private List<InvoiceItem> invoiceItemList; .. } ... OneToMany ( mappedBy = "invoice" , fetch = FetchType . EAGER , orphanRemoval = ...

 
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: ... ( cascade = CascadeType . ALL , fetch = FetchType . EAGER , optional = false ) ...

 
forum_thread

JPA-Query does not lead to any result

Hi, we have a database with a Entitiy inside which we want to fetch with a query. Normally that works without a problem, but in case of this database that query does not have any results. Can anyome help us what the problem is? SELECT FROM UserModelData usr WHERE usr.userName = 'admin' Attached are two databases, one where the query has a result and one where the query does not has any results. ... we have a database with a Entitiy inside which we want to fetch with a query. Normally that works without a problem, but in case of this ...

 
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; ... @OneToOne(orphanRemoval=true, cascade=CascadeType.ALL, fetch=FetchType.EAGER) private Object payload; the list that we put ...

 
forum_thread

Adding EntityListener Throws Unexpected Internal Exception

I tried adding EntityListener for a entity class and an exception was thrown. I followed similar as mentioned on the documentation but no luck. My entity class looks like below: ... @ MapsId @ ManyToOne ( fetch = FetchType . LAZY ) private SomeClass ...

 
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: ... ( cascade = CascadeType . ALL , fetch = FetchType . EAGER ) private ...

 
forum_thread

An ArrayIndexOutOfBoundsException with nested entities and enhanced entities

We have a new issue like the issue in the forum task http://www.objectdb.com/database/forum/1075. This issue is very important for us, because we want to create a release soon. ObjectDB version: 2.6.8_06 All our entities are enhanced. There are nested entities in following hierarchy: @Entity @Access (AccessType.FIELD) public abstract class ModifierImpl extends DataTypeImpl implements Modifier { ... = { CascadeType . ALL } , fetch = FetchType . LAZY ) private DataTypeImpl ...

 
api-jdo

fetchDoubleField(fieldNumber)

Fetch one field from the field manager.(Method of javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier)