About example

forum_thread

ObjectDB Enhancer Tool in Java 9

I am migrating to Java 9 and have encountered some issues, which I am sure will eventually be addressed by a Java 9 compatible ObjectDB future release, but while waiting for that release, perhaps you could give some advice for my current issues. Firstly, I created my own ObjectDB module.  I try to run com.objectdb.Enhancer from that module, but ObjectDB gives the error below.  My guess is the error is because ObjectDB is trying to detect its objectdb.home location by looking at its objectdb.jar location, which is not valid in a Java module environment. ... which is not valid in a Java module environment. Example command: java - Dobjectdb. conf = ObjectDb. conf -- ... all sorts of Java workarounds with no luck.  (For example, --add-exports, --add-opens, etc.) Example command: java ...

 
forum_thread

On initialisation of lists: impact on migration from EclipseLink to ObjectDB

I would like to draw the attention of those assessing migration from EclipseLink ORM to ObjectDB to a significant difference in the initialization of persistent lists, namely that EclipseLink injects a List implementation into the List field to be initialise it during EntityManager.persist(). So in EclipseLink the following works: public class HasListOfBlocks { .. ... be persisted with the parent. So in that case, using the example above, addBlock would be needed before EntityManager.persist is called, ...

 
page

Posting to ObjectDB Website - Important Instructions

Instructions for posting to ObjectDB website (to the forum, the issue tracking and the help desk).... and runnable). You may use the following example as an initial template for your test case: package test ; ...

 
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: ... from a non-internet connected network. A contrived example is: @ Entity public class Salesman { ... String name ; } For the sake of the example, each salesman has many numerical targets for each company. Two ...

 
forum_thread

LIMIT or TOP functions

Is there LIMIT or TOP functions in object db? If so can you provide some examples? ... methods. You can find more details and an example in the manual . ObjectDB Support ...

 
forum_thread

ObjectDB Full-Text Search

Is there any way to perform a Full-Text Search using ObjectDB and Lucene or something similar? If so, how? Are there any examples available? #1 2014-03-06 16:41 Is there any way to perform a Full-Text Search using ObjectDB and Lucene or something similar? If so, how ...

 
issue

When using inheritance, you can specify, which ID to use

When storing objects with inheritance, it should be possible to choose, which ID (parent or child class) should be used for new object. For example: public EntityA() {     @Id     long id;     String field1; }   ... (parent or child class) should be used for new object. For example: public EntityA ( ) { @ Id ... possible to trigger generating ID from child entity, for example like this: public abstract EntityA ( ) ...

 
forum_thread

LAZY @ManyToOne field functions as EAGER

In the code example below (also attached) I would like to understand why I am able to print to console a lazy @ManyToOne field after the entity manager closes. There is a switch DO_VIEW_BEFORE_CLOSE, and when it is true the fields are accessed and output before the finding entity manager closes and as expected both a LAZY @ManyToOne field and an EAGER @ManyToOne field are viewable: b.cLazy:{C}[2]"cLazy"
 b.cEager:{C}[3]"cEager" ... 01:19 In the code example below (also attached) I would like to understand why I am able to ... LAZY (unlike EAGER ) is merely a hint. For example, ObjectDB always loads simple value fields eagerly (e.g.  String ...

 
issue

Query execution creates a wrong result

Hello, we analysed an unexpected behavior and find out that the result of an Query are wrong. We prepared an Example that shows the BUG. (see attachment) The Example executes two Queries. The first returns an expected result (one Entity). The second Query is the first Query with an additional WHERE condition. But than we get another (wrong) result.   ... the result of an Query are wrong. We prepared an Example that shows the BUG. (see attachment) The Example executes two Queries. The first returns an expected result (one ...

 
manual

UPDATE SET Queries in JPA/JPQL

Explains how to apply server side bulk update using a JPA/JPQL query....  may break its synchronization with the database. For example, the EntityManager may not be aware that a cached entity object in ... database (including instances of subclasses). For example, the following three equivalent queries increase the population size of ...