About ObjectDB

issue

Problem with JOIN and inheritance

Hello, Please run this query on the attached DB: SELECT DISTINCT $1 FROM com.quasado.serviceplaza.customer.VendorCustomer $1 JOIN $1.qubletFRAGMENTMAP $2, com.quasado.foundation.warehouse.contract.customer.CustomerContractsFragment $3 WHERE ((NOT (($2=$3) AND ($3.contracts IS EMPTY)))) The problem is quite easy: The "VendorCustomer" class inherits from the "Customer" class. ... posting instructions - before posting to the ObjectDB website. You may have to ...

 
issue

Support Attribute Conversion for Persistence

The @Converter annotation and the Attribute Converter interface have two big benefits: 1) They make it possible to persist as-yet-unsupported java types (in the example below, Period - part of the 1.8 java.time package. (It could just have well shown conversion to and from SQL Timestamp objects.  2) They also make it possible to persist custom objects that are fundamental to your domain in an efficient manner.  ... serialization="true" /> option in the objectdb.conf file).  2) They also make it possible to persist ... posting instructions - before posting to the ObjectDB website. You may have to ...

 
forum_thread

Working with a cleared cache

I'm working on trying to improve the performance of our database processing class and I'm attempting to keep the L1 cache within the PersistenceManager cleared in an effort to reduce its memory footprint. The code snippet below is part of a Callable task that is run repeatedly with a given list of commands. When I run the code as written I start getting the stack traces that are listed.  However, if I comment out the calls to makeTransactionalAll() and evictAll() everything works.... } }   [ObjectDB 2.2.9] Unexpected exception (Error 990) Generated by Java ... Windows XP 5.1). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: null com.objectdb.o.InternalException at ...

 
forum_thread

Possible issue with timestamps

Hi, If I query doing something like: select c from CDI c where c.creationDate > {ts '2012-03-29 11:00:00} and c.creationDate < {ts '2012-03-29 12:00:00'} the test fails. Its ONLY for 12:00:00. When I started digging I found that if I queried 00:00:00 to 00:25:00 and then did 12:00:00 to 12:25:00 I got IDENTICAL results. For some reason 12:00:00 is being treated the same as 00:00:00. All other hours seem to be fine. ... a testcase. Paul. objectdb_example.zip edit ... Persistence . createEntityManagerFactory ( "objectdb:$objectdb/db/test.tmp;drop" ) ; EntityManager ...

 
manual

Running JPA Queries

Explains how to use JPA to run Java Persistence Query Language (JPQL) queries. The Query javax.persistence.Query JPA interface Interface used to control query execution. See JavaDoc Reference Page... interface defines two methods for running SELECT queries: Query.getSingleRes ...

 
issue

NullpointerException at a normal select

When I run the following code: EntityManager em = getEm(); Customer result = null; try {     logger.debug("Ident: "+ident);     result = em.createQuery("Select c from Customer c where c.identifier=:id", Customer.class).setParameter("id", ident).getSingleResult(); } catch (javax.persistence.NoResultException nre) { } finally {      em.close(); } I get the following error (you can also see the log message containing the String parameter at the top): ... in context with path [/ContentSite] threw exception [ObjectDB 2.5.6_02] Unexpected exception (Error 990) Generated by Java ... Mac OS X 10.9.5). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: java.lang.NullPointerException: ...

 
manual

JPA Query Structure (JPQL / Criteria)

Explains the structure of a JPQL query, which consists of 6 clauses: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY. The syntax of the Java Persistence Query Language (JPQL) is very similar to the syntax of SQL. Having a SQL like syntax in JPA queries is an important advantage because SQL is a very powerful query language and many developers are already familiar wi ...

 
issue

Post-compile enhancement sometimes causes error in generic loops: incompatible types found: java.lang.Object: required: Entity

I have moved from automatic run-time enhancement to explicit post-compile enhancement in an Ant build.xml in a NetBeans web app, and sometimes on editing a file that performs a generic loops over and @entity type I get a generics error. The loop is:  for (Steel s: this.steelMaterials.getL_Steel().getEls()) { eSteelTableItems.add(asXmlElement(s)); } Where getEls() here gives: List<Steel> This sometimes (only, I don't understand the circumstances) gives this error: ... that demonstrates this issue? ObjectDB Support ObjectDB - Fast Object Database for Java (JPA/JDO) ...

 
issue

Unexpected Exception during commit

I'm testing code that otherwise has been working with a clean database. I have seen several examples of the following exception. It never seems to happen in the same place twice, though. If you can give me a hint as to what would internally cause this, I'll try to reproduce it. Carl   ... try to reproduce it. Carl   [ObjectDB 2.2.9_01] javax.persistence.RollbackException Failed to commit ... Unexpected internal exception (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:277) at ... at java.lang.Thread.run(Thread.java:662) Caused by: com.objectdb.o.InternalException: Unexpected internal exception at ...

 
manual

GROUP BY and HAVING clauses

Explains how to use the GROUP BY and HAVING clauses in a JPA/JPQL query.... clause which returns the first letters as result. ObjectDB is very flexible in allowing JPQL expressions anywhere in the ... BY clause is like the WHERE clause for the FROM clause. ObjectDB supports the HAVING clause only when a GROUP BY clause exists. ...