About eager

forum_thread

Can't get arraylist/vector type attributes

I have a class that contains some attributes of type Vector (also tried with ArrayList and same happens). When I try to get an object from that class doing using the find method it works fine, I get the object. But when I call the close method to close the EntityManager the information from the Vector dissapears and I get an empty vector. ... the EntityManager or load it eagerly ( FetchType.EAGER ). See also "objectdb.temp.no-detach" as a possible quick ...

 
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: ... CascadeType . ALL , fetch = FetchType . EAGER ) private Object payload ;   @ OneToOne ... CascadeType . ALL , fetch = FetchType . EAGER ) private Map<String, Object> metadata ;   ... ...

 
forum_thread

@OneToMany(fetch = FetchType.LAZY) list is always null

Hello. @OneToMany(fetch = FetchType.LAZY) doesn't work when using EJB or something else related to J2EE. parent.getChildren() returns null. Here is a simple example: Bean: ... to the no-detach option, because all is OK when using EAGER loading, but when I use LAZY with PersistenceUnit ... to the no-detach option, because all is OK when using EAGER loading, but when I use LAZY with PersistenceUnit (not ... work well in your project you will probably have to use EAGER when necessary. ObjectDB Support ObjectDB ...

 
forum_thread

EntityManager.refresh takes a long time

EntityManager.refresh takes a long time for entity object Person in this code: ... ManyToMany ( fetch = FetchType . EAGER , cascade = CascadeType . REFRESH ) @ ... = "person" , fetch = FetchType . EAGER , cascade = CascadeType . ALL ) @ NotNull ...

 
forum_thread

How to query for list of lists ?

Hi, I have a problem with constructing query, that gets only embedded list of integers from Entity. Here's the example : Query query = em.createQuery("SELECT i.filterDescription FROM Inspiration i"); List<List<Integer>> result = query.getResultList(); where Inspiration is like this : ... ( fetch = FetchType . EAGER ) protected List<Integer> filterDescription ; ... ( fetch = FetchType . EAGER ) private List<String> reviewSnippets ; ...

 
forum_thread

Possible issue with Spring JPA and Embedded

Hello, ... detach. Your Spring JPA test passes if you set eager fetch for that collection: @ ElementCollection ( fetch = FetchType . EAGER ) public List<RulePart> getRules ( ) ...

 
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)  ... OneToMany ( fetch = FetchType . EAGER , cascade = CascadeType . ALL ) private ... you have to load the collection, and using EAGER fetch mode is one way to do that. ObjectDB ...

 
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 atelier ; .... } ...

 
forum_thread

Selective merge/cascade of detatched entity

I'm having an issue with my application, and I'm hoping you guys will be able to help. Please forgive typos and obvious errors, I'm having to retype from a non-internet connected network. A contrived example is: ... OneToMany ( fetch = FetchType . EAGER , cascade = CascadeType . All ) private ...

 
forum_thread

Removing an element from an @OneToMany doesn't work

Hello. I have a Parent and Child entities. // in the parent @OneToMany(mappedBy = "parent", fetch = FetchType.EAGER, cascade = CascadeType.ALL) private List<Child> children; // in the child @ManyToOne private Parent parent; Somewhere I do this: parent.getChildren().remove(0); manager.merge(parent); Manager.merge is just ... = "parent" , fetch = FetchType . EAGER , cascade = CascadeType . ALL ) private ...