About fetch

forum_thread

Should derived fields of an EmbeddedId be manually maintained by app code?

If I have an Entity which has a primary key which is derived and I am implementing it using @EmbeddedId, am I responsible for maintaining the derived fields of the @EmbeddedId? I could not find anything in the JPA 2.0 spec http://download.oracle.com/auth/otn-pub/jcp/persistence-2.0-fr-oth-JSpec/persistence-2_0-final-spec.pdf?e=1317047713&h=54831c176e81a244a4c309e13eba0b27 which tells me what to expect. ... id ;   @ ManyToOne ( fetch = FetchType . LAZY ) @ MapsId ( ... id ;   @ ManyToOne ( fetch = FetchType . LAZY ) @ MapsId ( ... relationship @ ManyToOne ( fetch = FetchType . LAZY ) private EContainer ...

 
issue

ClassCastException after upgrade to 2.3.5_03

On upgrading to the latest version of objectdb I get the following exception on object retrieval: ... true , cascade = CascadeType . ALL , fetch = FetchType . EAGER ) private Object payload ; ... true , cascade = CascadeType . ALL , fetch = FetchType . EAGER ) private Map<String, ...

 
forum_thread

Query vs Extent for retrieving data

I'm running into a problem where data that is retrieved via a Query comes out null, but when I retrieve it using an Extent everything is present. We have a very simple class: public class PositionReportManagerBean implements InstanceCallbacks { private int maxReports; private List<PositionReportBean> reports; } I have a test file with 5 instances of PositionReportManagerBean, each with maxReports set to 10 and 5 PositionReportBeans in reports. I can verify with the ObjectDB explorer that all of the data is there. If I call ... @Persistent(defaultFetchGroup="true") , or use fetch groups do define more complex fetch strategies. ObjectDB Support ObjectDB - ...

 
forum_thread

Database Inconsistency or corruption

Hi, since a week I have been trying to find a solution to a strange problem. We are using ObjectDB 2.6.8_02 im embedded mode. The problem is that data gets lost when updating an entity. 1-) Background Consider Three entities: ObjectValue, Attribute and Value. ObjectValue has a one to many relationship to Attribute and Attribute has a one to one relationship to Value. ... fetch =   javax.persistence.FetchType.EAGER, orphanRemoval = true) ...      fetch=javax.persistence.FetchType.EAGER)    ...

 
api-jpa

javax.persistence.EntityManager

Interface used to interact with the persistence context.(Interface of JPA)

 
manual

[ODB1] Chapter 4 - JDO Metadata

Shows how to define JDO metadata for persistence capable classes.... /> <field name = "f3" default-fetch-group = "true" /> <field name = "f4" default-fetch-group = "false" /> <field name = "f5" ...

 
manual

[ODB1] Chapter 3 - Persistent Classes

Explains what a persistence capable class is and which types are supported by JDO.... is being loaded from the database, just after the default fetch group fields (see Chapter 4 ) are initialized. A possible action is to ... fields in this loaded object that are not in the default fetch group, should not be accessed by this method. void ...

 
forum_thread

Optimistic locking: prevent version increment on entity collection attribute

Hello, I have an entity E with an attribute which is a collection of entities (one to many relationship) with an optimistic locking strategy supported by a version field. Is it possible to prevent the increment of the version of entity E when entities are added to or removed from the collection? Something like the equivalent of @OptimisticLock(excluded=true) in Hibernate? Thanks, Farid ... add ManyToOne of the owning side (Readings), added EAGER fetch to the collection no change. I have tried to persist the document ... should not make any difference. > added EAGER fetch to the collection no change. This should affect. An eager ...

 
forum_thread

GWT RPC is throwing serialization exception when I have object db date value

Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'objectdb.java.util.Date' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = Sat Jan 29 00:00:00 PST 2011    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:614)  ... after detaching. @ OneToMany ( fetch = FetchType . EAGER , cascade = CascadeType ... you have to load the collection, and using EAGER fetch mode is one way to do that. ObjectDB Support ...

 
forum_thread

Trouble bug on explorer

Hello having trouble when i try to push new objects from class. I got exception from explorer.     ... ;     @ OneToOne ( fetch = FetchType . EAGER ) private Language mainLanguage ; @ OneToMany ( fetch = FetchType . LAZY ) private ...