About path

release

2.5.4

... Changed JOIN FETCH to act as LEFT JOIN in path expressions. Updated the PDF manual. Fixed a ... #48 ). Fixed a bug in compilation of path expressions in queries. Fixed handling null  values ...

 
forum_thread

How to convert a boolean to an int in the query?

How to convert a boolean to an int in the query? I have five parameters of type boolean in the entity object - approveEmail, approvePhoneNumper, ... I can not sort them ORDER BY approveEmail, approvePhoneNumper, .... because the parameters equivalent. I want to sort them in the query by their sum ORDER BY (approveEmail + approvePhoneNumper + ... ) But I get an exception com.objectdb.o._PersistenceException: Invalid operand type boolean for operator + ... q. from ( City. class ) ; Path<Boolean> boolCaptial = c. get ( "capital" ) ... q. from ( Person. class ) ; Path<Boolean> boolApproveEmail = c. get ( "approveEmail" ...

 
forum_thread

Does ObjectDB support lazy loading?

I'm evaluating ObjectDB 2.0 RC1. Everything works fine except a lazy loading problem. I've a Parent class which contains List<Child>, marked with @OneToMany. After persisting a Parent object, (in the Explorer) I can see all the property values of the Child objects in the list. However, when the Parent object is read from EntityManager, all the properties except ID of the Child objects are null. The EntityManager is not yet closed when the getters are called.... ] args )   { String path = "test.odb" ; EntityManagerFactory emf = Persistence . createEntityManagerFactory ( path ) ;   EntityManager em = emf. ...

 
manual

Database Server

Explains how to run and use the ObjectDB object database Server to manage Java/JPA/JDO databases in client-server mode.... If objectdb.jar is not in the current directory a path to it has to be specified. Running the server with no arguments ... start | stop | restart options include: -conf <path> : specify a configuration file explicitly -port ...

 
forum_thread

Problem with Criteria Querys

Hi, i am having problems running following code...   ... type CriteriaBuilder is not applicable for the arguments (Path<Object>, ParameterExpression<Double>) The method ... type CriteriaBuilder is not applicable for the arguments (Path<Object>, ParameterExpression<Double>) at ... ( Double. class , "p2" ) ; Path<Double> lon = d. get ( "lon" ) ; q. ...

 
forum_thread

lockfiles in client/server mode

i have an objectdb server running on localhost as user "objectdb", spawned like so: java -server -cp /usr/local/share/objectdb/objectdb.jar: com.objectdb.Server -conf /etc/objectdb/objectdb.conf start it has naturally created and taken ownership of /tmp/ObjectDB. ... does not help. for example, < temp path="$objectdb/work" threshold="64mb" / > ... temporary files. Changing the temporary directory path on the client side should solve the problem, so maybe the configuration ... file is probably not used (see rules for the configuration path on this manual page ). A better solution could be changing the ...

 
forum_thread

How to configure where the ODB is stored?

Hi, The documentation is lacking in this respect. How do I configure where the ObjectDB database file is stored. I need to know where it is so I can inspect it with 'database explorer'. The docs say to set it to "$objectdb/db/points.odb" and that this defaults to "the installation directory of ObjectDB". BUT... I DIDN'T INSTALL OBJECTDB - my maven build downloaded it and embeded it. So, where is this file stored??? Also, the contents of the DB don't seem to be persisted between AppServer restarts.  ... You may specify any file path (e.g. an absolute path  "C:\data\my.odb" ). The $objectdb prefix refers to a ...

 
release

2.5.3

... Changed JOIN FETCH to act as LEFT JOIN in path expressions. Updated the PDF manual. Fixed a ... #48 ). Fixed a bug in compilation of path expressions in queries. Fixed handling null  values ...

 
forum_thread

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 to my inquiry a few months ago. However, I have run into one problem: if an embedded collection is empty, but I attempt to LEFT JOIN FETCH all the members of a collection within a (non-existent) member of the first collection, the result of the overall query is an empty set. To use the example from my original post: @Embeddable class A { String val; };   ... problem may be with the expression  c.bList.val . Path expressions are considered as INNER JOIN by JPA, although apparently it makes sense to consider path expressions in LEFT JOIN FETCH differently. ...

 
manual

Database Doctor

Explains how to use the ObjectDB object database Doctor tool to diagnose and repair database files and damaged Java/JPA/JDO objects.... If objectdb.jar is not in the current directory a path to it has to be specified. The tool main class is ... line argument for running a database diagnosis is the path to the database file (e.g. my.odb as shown above). Diagnosis ...