About fetch

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 , ...

 
forum_thread

Issue with orphanRemoval and multiple EntityManagers

Hi, We have a problem where our database size grows over time more than expected. We've traced it down to the following issue: ... ( cascade = CascadeType . ALL , fetch = FetchType . EAGER , orphanRemoval = true ) ...

 
forum_thread

Object DB vs EclipseLink/TopLink: Unloaded relationships in detached entities

This topic is for those considering migrating from EclipseLink JPA or TopLink to ObjectDB JPA. ... until the stateful bean is released. 3. Use a FETCH JOIN as described here: Detach JPA objects with lazy ...

 
forum_thread

JDO sequences from ORM file

I want to use sequences in JDO without using annotations. Normally this is done with a package-X.orm file, where X is a value passed to the PersistenceManagerFactory as the value of property "mapping". I'm encouraged to see that the JDO zip that comes with ObjectDB includes the DTD/XSD for this type of file, though I can't see a mention of it in the manual. ... >   <!-- Persistable Types with Fetch Groups --> <class name = "JdoTypes$ClassWithFetchGroup" > <fetch-group name = "fg1" post-load = "false" > ...

 
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

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

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 ...

 
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

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

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" /> ...