About fetch

forum_thread

Query problem

Given : @Entity(name = "Inspiration") public class Inspiration implements Serializable {     ....     @ManyToOne(fetch = FetchType.EAGER)     protected Atelier atelier;     .... } I have a query : ... { .... @ ManyToOne ( fetch = FetchType . EAGER ) protected Atelier ...

 
forum_thread

Composite indexes

Hi, I read your manual about defining Indexes for JPA Entities (http://www.objectdb.com/java/jpa/entity/index), but I still have some problems understanding how and when should I use them.   Let's start with some example then. Assume we have an entity that represents an interior design image, called Inspiration : ... to 10.0   @ ElementCollection ( fetch = FetchType . EAGER ) List<Integer> ...

 
forum_thread

Relationship Annatations

hi,   what is the purpose of annotating a field with a RDB relationship shuch as OneToMany. ManyToMany etc? ... need these annotations in ObjectDB to specify cascading / fetch policy and other settings. ObjectDB Support ...

 
issue

com.objectdb.o.InternalException: null

After an error in a @PrePersist method in an Entity class, the database stopped working. Fortunately this was in development, but still worrying! The Entity class ... OneToMany ( mappedBy = "customer" , fetch = FetchType . EAGER ) private ...

 
api-jdo

FetchPlan.DETACH_LOAD_FIELDS

For use with PersistenceManager.detachCopy and setDetachmentOptions.(Static Field of javax.jdo.FetchPlan)

 
forum_thread

Speeding up reporting queries with size() on list

Hi, I'm working on some reporting stuff in our application. One of few different reports should include activity on last modified objects. The query for now looks like this: select date(insp.lastModificationDate), insp.modifiedBy, insp.description.length(), insp.products.size(), insp.picture from Inspiration insp order by date(insp.lastModificationDate) desc insp.description is normal String field in Inspiration entity. insp.products is a list with 0 to 600 objects. Definition: ... ( targetEntity = Product. class , fetch = FetchType . LAZY ) private ...

 
api-jdo

PersistenceCapable.LOAD_REQUIRED

If jdoFlags is set to LOAD_REQUIRED, then the fields in the default fetch group cannot be accessed for read or write without notifying the StateManager.(Static Field of javax.jdo.spi.PersistenceCapable)

 
forum_thread

com.objectdb.o.NLV cannot be cast to com.objectdb.o.RSV

Hello! This query is working fine SELECT DISTINCT $1 FROM ChatHistoryItem $1 JOIN $1.recipient $2 JOIN $1.sender $3 WHERE ($2.id='22afeafe-363f-4397-8553-cc5688ba142d') OR ($3.id='22afeafe-363f-4397-8553-cc5688ba142d')  ORDER BY MAX($1.createDate) DESC   but this query returns an exception "com.objectdb.o.NLV cannot be cast to com.objectdb.o.RSV" SELECT DISTINCT $1 FROM ChatHistoryItem $1 JOIN $1.recipient $2  ... ( targetClass = ChatAttachment. class , fetch = FetchType . EAGER ) private ...

 
api-jdo

addFetchGroups(groups)

Add the FetchGroups to the set of active fetch groups.(Method of javax.jdo.PersistenceManagerFactory)

 
forum_thread

"Unexpected query expression" using CriteriaQuery FetchParent Interface

Using the fetch over Root attribute, the exception is: com.objectdb.o._PersistenceException: Unexpected query expression end (non keyword identifier is expected) com.objectdb.o._PersistenceException.b(_PersistenceException.java:45) ... 19:50 Using the fetch over Root attribute, the exception is: ... root = criteriaQuery.from(Person.class);   root.fetch("PersonData"); //@OneToOne relationship   ...