ObjectDB Database Search

51-100 of 200 results

Lazy Init / Eager / Join Fetch collection strategy ? What to choose ?

Hello, I'm doing some tests to choose the best collection fetch strategy. I have entities ... this article,join fetch seems to be the right choice. What about ObjectDb ? The implementation is totally different. Is an "All eager strategy" more efficient that many join fetch ( cartesian product + distinct

LEFT JOIN FETCH over empty embedded collection returns no results

First of all, thank you for promptly implementing JOIN FETCH over nested paths in response ... , but I attempt to LEFT JOIN FETCH all the members of a collection within a (non-existent) member ... works (returns my instance of C): SELECT c FROM C c LEFT JOIN FETCH c.bList WHERE id=:id; But if I

How to use JOIN FETCH?

of using JOIN FETCH to avoid excessive round trips to the database: SELECT c FROM Country c JOIN FETCH c ... , then I get the correct addresses (obviously fetched lazily), but still 2 results.  What should I be doing to get what I want out of this query? Note that I need to get the fetch mode specified in

Problem with @Basic(fetch = FetchType.LAZY)

I have a class where two fields are annotated with  @Basic( fetch = FetchType.LAZY ... (swing app). Yet they don't seem to be fetched lazily. This class should hopefully demonstrate the problem: import javax.persistence.*; @Entity public class Sample { private String title; @Basic( fetch

Fetching Collections Puzzle

declare explicitly the fetch strategy for "children" as FetchType.Eager, then how can I retrieve the Nodes ... ;colletions are to be lazy fetched . You can try this in a query.  "select n from Node n left outer join fetch n.children where ....." this will also fetch your collection. Basically you can use

Query with FETCH JOIN returns multiple results instead of one.

jpqlResult = em.createQuery( "SELECT d FROM Demand d JOIN FETCH d.services WHERE d=:demand ... and fetch its services. Demand object is identified and found correctly, but as it is associated ... should return only one result, with fetched service sub-elements, shouldn't it? I am almost sure (but I

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 aClasses; } Now, I want to fetch all B classes

Is there any restriction when using fetch=FetchType.LAZY ?

Hi, I came across a weird behavior when using  fetch =FetchType.LAZY in a complex code ... am using in object declaration @OneToMany( fetch =FetchType.EAGER, cascade = CascadeType.ALL) private LinkedList referencedObj; My test suite is running well. 2. However when I change fetch to LAZY

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

Hello. @OneToMany( fetch = FetchType.LAZY) doesn't work when using EJB or something else related ... , generator = "b") private int id; @OneToMany( fetch = FetchType.LAZY, cascade = CascadeType ... Parent { // ...id @OneToOne( fetch = FetchType.LAZY, cascade = CascadeType.ALL) private ByteData bydaData

Eager Fetch is not stable for collection or map types?

map types is not stable, we lost them sometimes after JVM restarted. Eager fetch is properly set ... and fetch is: @Entity public class Game {     .......     @ElementCollection( fetch =FetchType.EAGER)     private List members = new ArrayList ();   

Global way to set Lazy-loading fetch functionality for all the fields

fetch policy, I know the local way to do it (@ManyToOne( fetch =FetchType.LAZY)). Is there any way ... per relationship, and for some extent also per query (using JOIN FETCH ). support Support

2.4.7 Fetch

am noticing in 2.4.7 that ' fetch ' cannot be added to objectdb.conf so, wondering how to enable 'eager' fetching of collections ?   Dave   dmoshal David Moshal The question is unclear. Is it something new or different in version 2.4.7? Eager fetching has always been set by annotations or

Failed to write the value of field using reflection (error 363) on LAZY fetch

- fetch ", "LAZY");) on the query execution it works. I assume it has to do with the @Transactional ... hints? The Mapping of class Modell and its member: @Entity class Modell { ... @OneToMany( fetch ... .result- fetch ", "LAZY");     List entities = query.getResultList(); } Stack Trace

Is there a way to set EAGER fetch on all "ToMany" collection relationships

Given that the default seems to be FetchType.LAZY for all collections @OneToMany and @ManyToMany. Such as a configuration option. Instead of having to explicitly set fetch in annotation code in ... as the fetch type of all relationships may cause loading the entire database into memory

LazyInitialization / join fetch

the fetch join? If so should I do to all fields of List , ie OneToMany or should also be done for joins ? Grateful. This may be occurring due to not doing the fetch join? If so should I

@Lob @Basic(fetch = FetchType.LAZY) is loaded when it's not needed

Hello. I have a class Thing that contains OneToMany list of classes Photo. Photo contains  @Lob @Basic( fetch = FetchType.LAZY) private byte[] content; And after some queries with Thing ... of the photos despite of using  fetch = FetchType.LAZY. How can I fix this memory issue? Vladiator

objectdb got hang after fetch some record.

All of my client threads are got hang after doing some fetch operations due to objectdb. Stack trace: java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.socketRead(SocketInputStream.java:116) java.net.SocketInputStream.read(SocketInputStream.java:171) java.net

What is the query to fetch all schema list of my database?

Can you please tell me how to fetch all schema available in my database? Deepak_1996 Deepak Kumar Maharana You can use the JPA metamodel API . support Support

Fetch Set from DB only works on debug mode

I have a class A, that contains a LinkedHashSet of  another class named B. When I try to fetch that hash set, it returns a null pointer. BUT, when I run the program in debug mode, it works fine!! So I'm almost sure it is a bug? Or maybe something I'm doing wrong? Here is a test class

Mapped By Fetch is very Slow

, go the MyEntity class and remove "mapped-by". You obtain 1 second max of query fetch . So my performance

Entity has be persistended,but query not fetched?

I create a new entity T newT and persistend it,then I create a query "select t from T t" to fetch all T entities.But  then the newT is not contain in the query result. Why? code order: query.setFlushMode(FlushModeType.AUTO); query.getResultList();   maozf maozf The following example

fetch by enum

I have Entity named Fruits  with a column Type which is a enum. I want to fetch the based on Type  Eg.  Query qry= em.createQuery("Select f from Fruits f where f.Type =: t ");         qry.setParameter("t",Type.Sweet);   But it return

Getting this error when fetching records from mem db.

Getting this error when fetching records from mem db.

Threading Problem (maybe with Criteria)

thread safe (as would a ConcurrentLinkedHashMap). FETCH thread nr (36) count: 982 UIDs in 26 msek FETCH thread nr (41) count: 982 UIDs in 29 msek FETCH thread nr (44) count: 982 UIDs in 14 msek FETCH thread nr (39) count: 982 UIDs in 25 msek FETCH thread nr (42) count: 982 UIDs in 31 msek FETCH

jakarta.persistence.ManyToOne

FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched ... must be eagerly fetched . The LAZY strategy is a hint to the persistence provider runtime. If not

jakarta.persistence.ElementCollection

when defined using generics. Default: void/class Since: Jakarta Persistence (JPA) 1.0 FetchType fetch (Optional) Whether the collection should be lazily loaded or must be eagerly fetched . The EAGER ... must be eagerly fetched . The LAZY strategy is a hint to the persistence provider runtime. If not specified

jakarta.persistence.EntityGraph

, this operation suppresses inclusion of an attribute mapped for eager fetching . The effect ... for eager fetching . The effect of this call may be overridden by subsequent invocations of Graph ... suppresses inclusion of attributes mapped for eager fetching . The effect of this call may be overridden by

jakarta.persistence.Subgraph

for eager fetching . The effect of this call may be overridden by subsequent invocations of Graph ... suppresses inclusion of an attribute mapped for eager fetching . The effect of this call may be overridden ... is interpreted as a load graph, this operation suppresses inclusion of attributes mapped for eager fetching

jakarta.persistence.OneToOne

default no operations are cascaded. Default: {} Since: Jakarta Persistence (JPA) 1.0 FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched . The EAGER ... fetched . The LAZY strategy is a hint to the persistence provider runtime. If not specified, defaults

jakarta.persistence.OneToMany

(JPA) 1.0 FetchType fetch (Optional) Whether the association should be lazily loaded or must be eagerly fetched . The EAGER strategy is a requirement on the persistence provider runtime that the associated entities must be eagerly fetched . The LAZY strategy is a hint to the persistence provider runtime

General Performance Issues Illustrated with a Specific Method

(cascade = CascadeType.ALL, fetch = FetchType.EAGER) private Person person; @Index private String phn; private String comments; /* Create Properties */ @ManyToOne( fetch = FetchType.LAZY) private WebUser ... .persistence.TemporalType.DATE) private Date createdOn; @ManyToOne( fetch = FetchType.LAZY) private

Fetch a whole entity graph eager

 eager fetch . JOIN FETCH queries . JDO fetch groups . support Support Hello

significant performance decrease

; @OneToMany( fetch =FetchType.LAZY) public List actions = new ArrayList (); @OneToMany( fetch =FetchType.LAZY) public List childNodes = new ArrayList (); @OneToMany( fetch =FetchType.LAZY) public List container = new ArrayList (); @OneToOne( fetch =FetchType.LAZY) public ObjectNode currentLocation; @OneToOne

Mapped by fields are not initialized by JOIN FETCH in queries

As demonstrated in this forum thread , a mapped by collection field with lazy fetch mode is not initialized in results of a query that uses JOIN FETCH on that collection field (when enhancement is used). support Support   Build 2.4.1_06 fixes this issue (fields are now initialized

Eager Fetch of Map with Entities as Keys

id = 1;         @OneToMany( fetch =FetchType.EAGER)   

jakarta.persistence.Lob

it defaults to CLOB ; for all other types it defaults to BLOB . Example 1: @Lob @Basic( fetch = LAZY) @Column(name = "REPORT") protected String report; Example 2: @Lob @Basic( fetch = LAZY) @Column(name

jakarta.persistence.EntityManager

class with the given primary key, whose state may be lazily fetched . If the requested instance does ... of the given object, with the same primary key as the given object, whose state may be lazily fetched

jakarta.persistence.criteria.FetchParent.getFetches()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.FetchParent Set getFetches() Return the fetch joins that have been made from this type. Returns empty set if no fetch joins have been made from this type. Modifications to the set do not affect the query. Returns: fetch joins made from this type. Since: Jakarta Persistence (JPA) 1.0

persisting object with long[][] arrays of array

;  @OneToMany( fetch = FetchType.EAGER, cascade = CascadeType.ALL) public long[] time;     @OneToMany( fetch = FetchType.EAGER, cascade = CascadeType.ALL) private long[][] a1;     @OneToMany( fetch = FetchType.EAGER, cascade = CascadeType.ALL) private long[][] a2;  

Missing (null) elements in eager loaded references

has a OneToMany relationship to DataElement. Every relationship is eagerly fetched   Problem ... amount: Element.getCosts().get(0).getAmount() X   Could it be that despite being fetched eager ... ; etc... } @MappedSuperclass public abstract class BaseCostElement extends BaseElement { @ElementCollection ( fetch

jakarta.persistence.NamedEntityGraph

fetched when an operation which retrieves an instance or instances of the root entity is executed

jakarta.persistence.Graph.removeAttributeNode(String)

Jakarta Persistence (JPA) Method in jakarta.persistence.Graph void removeAttributeNode (    String attributeName ) Remove an attribute node from the entity graph. When this graph is interpreted as a load graph, this operation suppresses inclusion of an attribute mapped for eager fetching

jakarta.persistence.Graph.removeAttributeNode(Attribute)

Jakarta Persistence (JPA) Method in jakarta.persistence.Graph void removeAttributeNode (    Attribute attribute ) Remove an attribute node from the entity graph. When this graph is interpreted as a load graph, this operation suppresses inclusion of an attribute mapped for eager fetching

jakarta.persistence.Graph.removeAttributeNodes(PersistentAttributeType)

mapped for eager fetching . The effect of this call may be overridden by subsequent invocations of Graph

jakarta.persistence.FetchType.LAZY

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.FetchType LAZY Data may be lazily fetched . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.FetchType.EAGER

Jakarta Persistence (JPA) Enum Constant in jakarta.persistence.FetchType EAGER Data must be eagerly fetched . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.EntityManager.getReference(Class,Object)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T getReference (    Class entityClass ,    Object primaryKey ) Obtain a reference to an instance of the given entity class with the given primary key, whose state may be lazily fetched . If the requested

jakarta.persistence.EntityManager.getReference(T)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager T getReference (    T entity ) Obtain a reference to an instance of the entity class of the given object, with the same primary key as the given object, whose state may be lazily fetched . The given object

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

() { return ownedElements; } private Element owner; @ManyToOne( fetch = FetchType.LAZY) @JoinTable(name ... might be the problem here. Try setting the fetch type of  ownedElements to EAGER and check ... (the default fetch type for to-many) - the entity objects are detached without that field

Best practise loading big data

a boolean flag. @Entity class MyStepBlockCollection { @OneToMany ( cascase = ALL , fetch = Lazy ... = ALL , fetch = Lazy , target = MyStep } ArrayList steps; } @Entity { class MyStep { @ElementCollection ( fetch = LAZY ) ArrayList values; } @Embeddable class MyValue { @Basic boolean flag; @Basic String