About fetch

forum_thread

ObjectDB CRUD Examples

Any place where I can find Netbeans examples for the basic create, read, update, delete methods using the EntityManager? i.e. public void create(Foo foo) {} public Foo read(Integer id) {} public List<Foo> read() {} public void update(Foo foo) {} public void delete(Foo foo) {} #1 2014-02-28 16:37 Would this be correct? public List<Foo> read ( ) { Entity ...

 
forum_thread

Java 8 Enhancer Problem

Hello! I am currently migrating my project to Java 8. I'm using Spring and AspectJ load time weaving. Unluckily the LTW option of Spring is global. If it's enabled it also tries to find other class transformers on the classpath. This is normaly not a problem because the ObjectDB enhancer ignores non @Entity or already enhanced classes but in conjunction with new Java 8 class files it throws an exception which causes Spring to stop weaving.  ... 2.5.5_01 fixes this issue but it has a new bug. When I fetch, detach, change and merge an object I get the following exception: ...

 
forum_thread

Missing Data on Retrieval (0, null values)

I try  to export all Objects in an Flatfile-Hiearchy (.csv). But only the first exported Table contains all necessary Data. Most of the others  contains all  Object-Rows', but most Values of the Columns are missing. With a  em.clear() inside the Loop, all tables are exported correctly but the Enity-Keys do not match. I can't get the point - what am i doing wrong?   emf = Persistence.createEntityManagerFactory(dbFile); em = emf.createEntityManager(); #1 2016-04-13 07:07 I try  to export all Objects in an Flatfile-Hiearchy (.csv). But only the first exported Table contains ...

 
forum_thread

Cannot sort descending, when ordering by caluculated float in a method

Hi, I have found an issue in ordering by a method. I have two entities : Invoice and InvoiceItem. public class InvoiceItem{ ..     private float price;     private float amount; .. }   public class Invoice{ ... OneToMany ( mappedBy = "invoice" , fetch = FetchType . EAGER , orphanRemoval = true , ...

 
api-jpa

JPA Queries

Reference (JavaDoc) of all the JPA query types, including Query, TypedQuery, CriteriaBuilder, CriteriaQuery, Tuple, Root, Expression, Order, etc.... clause elements (representing range variables, join and fetch): Criteria Query From Elements Other ...

 
forum_thread

Merge on detached entities

Hello, it is possible to merge detached entities? There are some attached entities which load from the database. The transaction is finished and the entities become detached. In a new transaction the fields of the detached entities will be changed and a merge by em.merge(entity) will be saved the entities. Can this works correctly? How are the rules of the merge process? Do the changed fields of the detached entity overwrite the fields in the database? Also changed fields which are set to null? ... loading. What settings on annotations are needed regarding fetch types and cascades. Kind regards ...

 
issue

[ObjectDB 2.2.5_02] Unexpected exception (Error 990) com.objectdb.o.InternalException: java.lang.NullPointerException: null

reporting issue as requested  ... = javax. persistence . CascadeType . ALL , fetch = javax. persistence . FetchType . EAGER ) ...

 
forum_thread

Retrieval by Access bug?

Dear Sirs, I have an object A, that has a OneToMany FetchType.EAGER List of objects B, that has a field with a reference to an object C. I have this code: ClassA objectA = em.find(ClassA.class, 1); for (ClassB objectB : objectA.getListB()) {     ClassC objectC = objectB.getObjectC(); } em is an open Entity Manager with a running transaction. ... classes, since enhancement improves ObjectDB ability to fetch objects when needed. ObjectDB Support ...

 
forum_thread

Performance tuning, best practices

we have a system where we serve from a host process around 200 clients connected via webSockets (Jetty). The core process is running on a dedicated Windows 2012 server with 16 GByte RAM and 8 processor cores.  What is strange for us is that max 20% of the cpu resources are used and the IO subsystem is at maximum 30% of activity under heavy load but database queries are let's say not at the speed we would expect. We have currently 20.000.000 objects in the database, our configuration settings are: ... />         <fetch hollow="true" />   <persist serialization="false" /> ...

 
forum_thread

Failing to read entities under load in multithreaded tests

Hi, We are experiencing an issue in our application that only occurs under load - we sometimes fail to read entities from the database. ... ( cascade = CascadeType . REFRESH , fetch = FetchType . EAGER ) private TestEntity ...