About WHERE

forum_thread

Grouping by date()

Hi, For some time now we can use date and time function in queries to extract part of date time (from documentation): YEAR({d '2011-12-31'}) is evaluated to 2011. MONTH({d '2011-12-31'}) is evaluated to 12. DAY({d '2011-12-31'}) is evaluated to 31. HOUR({t '23:59:00'}) is evaluated to 23. MINUTE({t '23:59:00'}) is evaluated to 59. SECOND({t '23:59:00'}) is evaluated to 0. ... BY hour ( ov . created ) ASC where ov.created is normal Date() field return only hours from 0 to 11 (check ...

 
forum_thread

Drop the entire database, Change the schema

I am trying to port and example app to ObjectDb. As part of the tests I drop the database and reload it with the new schema automatically between test cycles. Is there a simple way to do this with ObjectDb, or is the only way to delete the database file everytime? Thanks ... 2011-10-07 21:07 where in the configuration file does this go?   ...

 
forum_thread

Optimistic lock failed

Hi, I frequently see exceptions during development such as com.objectdb.o._RollbackException: Failed to commit transaction: Optimistic lock failed for object com.example.MyEntity#3 (object has version 1 instead of 3) Could you please explain what this means, and what I can do about it. Thanks you, Carl     ... or you've got some super wierd situation where that causes a signifcant performance issue.If you can't use ...

 
manual

Running JPA Queries

Explains how to use JPA to run Java Persistence Query Language (JPQL) queries.... Page... ( "SELECT c FROM Country c WHERE c.name = 'Canada'" ) ; Country c = ( Country ...

 
issue

NPE on em.createQuery(query).getResultList()

(JPA2 support getting better but still not quite there, excellent progress regardless). Difficult to see what's going on because of obfuscation, but it didn't look like this exact issue was reported yet (seemed to differ from the other reported and fixed NPEs): ... ( "SELECT e FROM MyEntity e WHERE e = :p" ) ; query. setParameter ( "p" , e ...

 
forum_thread

Database size is much larger than expected (x2)

I store images into objectdb. The schema is : <URI>::=(<sUrl>, <cMark>, <iSize>, <baBody>, <id>) <sUrl>::=String <cMark>::=char <iSize>::=int <baBody>::=byte[] <id>::=@ID So simple a class will fail after 155,648 insertions with -Xmx1432m, ... Since you didn't publish your classes it is unknown where is exactly the problem, but apparently you store the same byte[] more ... I just em.persist(obj), and the obj has the same fields, where is the second copy? If you have time to follow my codes, then ...

 
forum_thread

Failed to read the value of field using reflection

I have recently encountered an issue with reading objects: ... store characters on player, and Map<Stat, Integer> (where Stat is an Enum) to store stats on character. I am using the latest ...

 
forum_thread

Failed to enhance dynamic type

Hi, We are trying to enhance a class with OSGI Weaver using the JEnhancer.THIS instance as a class transformer. Works very well except for some entities, i.e. we do have an entity which has: @Override public String getQubletHeadingMain(LanguageContext context) This is a simple implementation of our custom interface and should of course, NOT be enhanced. Yet, we get an error due enhancing: Failed to generate dynamic type com.quasado.galaxy.foundation.api.language.LanguageContext ... ObjectDB can work around by generating synthetic classes where classes are missing. I don't know why this process fails in your ...

 
forum_thread

Removing an entity throws exception

Hi all, I'm testing ObjectDB for my project, but I have troubles with it. At this time I'm not able to remove customer entity, when it's read by a query (it's attached), it throws this exception: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: com.objectdb.o._RollbackException: Failed to commit transaction: 51 ... ... result with 2.2.5) What does the exception mean? Where is the mistake? Thank you Michael ...

 
forum_thread

Tomcat + JPA Problem

Hi i tried to setup the example from your webpage (jpa - Tomcat with Ecplipse) and i always get this Error: [ObjectDB 2.1.0] class "javax.persistence.Entity"'s signer information does not match signer information of other classes in the same package   ... how to use the explorer with a Tomcat Application where can i find the db-files? ...