ObjectDB Database Search

51-100 of 200 results

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

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

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

Fetch a whole entity graph eager

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

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

entity class with the given primary key, whose state may be lazily fetched . If the requested instance ... 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

Transaction isolation support?

. (Especially if using LAZY fetch sub object). Do I always just get the list of objects as it looks when the fetch start? Martin   mt Martin Every EntityManager manages its own memory objects ... own defined as @OneToMany( fetch =FetchType.LAZY) List bookList; (And in this example, there is only 1 object in

EntityManager JPA or JDO impl and different behavior

, and particularly how exactly that map is defined and with which fetch type. If the problem ... ; @OneToMany(cascade=CascadeType.PERSIST, fetch =FetchType.EAGER)         ... ;    fetch =FetchType.EAGER, orphanRemoval=true)       

Object as parameter results in exception

T fetch (Company company, Long primaryKey) {   mLogger.info(" Fetching type: {} with id ... ;@Override public T fetch (Company company, Long primaryKey) {   mLogger.info(" Fetching type ... T fetch (Company company, Long primaryKey) {   mLogger.info(" Fetching type: {} with id

Listing large number of complicated objects with paging.

). The problem is probably with the extensive EAGER setting in Product , and particularly with eager fetch of inverse (mapped by) collections. Massive inverse fetch is currently inefficient and has to be improved ... ( setMaxResults ). Does that number affect? You may try running the query with a lazy fetch hint (as done by

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

How to Remove records from many to many relationship tables in JPA

public class TransportationEvent { ... @ManyToMany( fetch = FetchType.EAGER, cascade = CascadeType ... { .... @ManyToMany( fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) private List transportationEvents ... .annotations.CascadeType.DELETE_ORPHAN) and i applied that as @ManyToMany( fetch = FetchType.EAGER, cascade

Performance issue in a query due to compareTo calls

) @ElementCollection private Map values = new HashMap (); @OneToOne ( fetch = FetchType.LAZY, cascade ... ; @OneToOne ( fetch = FetchType.EAGER) private TCStep step; //For performance reasons, we use a list ... @ElementCollection ( fetch = FetchType.EAGER) private Map values = new HashMap (); } btc_es BTC

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

New entity objects are duplicated on merge cascading

;       @OneToMany(cascade= CascadeType.ALL, fetch = FetchType.EAGER ... ;    @OneToOne( fetch = FetchType.LAZY, cascade = CascadeType.ALL)     ... ;       @ManyToOne( fetch = FetchType.LAZY)      

JQL-Update Queries fails with activated L2-Cache

-Query and fetching Entities afterwards from database. Expected result: Getting changed Entities from ... using UPDATE-Query, calling entityManger.clear() and fetching Entities afterwards from database ... using UPDATE-Query and fetching Entities afterwards from database. Expected result: Getting changed