About WHERE

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. ... my collection relationships were null (not even just empty where appropriate), and on various pages I got NullPointerExceptions where non-null collection results (including non-null empty) were expected. ...

 
forum_thread

ClassCastException on SELECT NEW ... after UPDATE over Java RMI

Hi, we are using ObjectDB 2.5.4_04 on Linux. Our application, which uses ObjectDb as a DB, exposes a Java RMI interface which allows remote RMI clients to run JPQL queries on the DB. The application internally runs SELECT NEW ... queries. For example: ... . fileName ) FROM RecordingMetaData AS r WHERE ... A remote RMI client runs SELECT (but not SELECT NEW ... SET r . notes = '#%# Emil~FE~FF~00~27s note' WHERE r . id IN ( 1 ) The DB file after the ...

 
manual

DELETE Queries in JPA/JPQL

Explains how to apply server side bulk delete using a JPA/JPQL query.... the GROUP BY, HAVING and ORDER BY clauses. A WHERE clause, which is essential for removing selected entity objects, is ... a specified limit: DELETE FROM Country c WHERE c . population < :p The query can be executed as ...

 
issue

InternalException when using MEMBER OF on a large list in a query

Hello, we get when executing a query with MEMBER OF on a large list the following InternalException: Caused by: com.objectdb.o.InternalException: merge2 com.btc.ep.coverage.bl.internal.dmos.CoverageRecordImpl:null => merger[2850057]-missing:223 at com.objectdb.o.PBI.B(PBI.java:124) at com.objectdb.o.PBI.q(PBI.jave:97) at com.objectdb.o.OBI.Vp(OBI.java:244) (... more see attached Image) Our query looks like this: ... + recordClassName + " AS record " + "WHERE property.uid MEMBER OF record.properties AND property.scopeID MEMBER OF ... FROM CovPropImpl AS property, CovRecImpl AS record WHERE property.uid MEMBER OF record.properties" But after adding the ...

 
forum_thread

Get multiple entities by Id

I'm trying to fetch a list of entities, by their Id. I Use this query: SELECT c FROM User c WHERE c.id IN :ids This querey works as long as I don't set the property "id" as @Id. If i set @Id to any other member, this query works, if I set id as @Id, it stops working and gives zero results. Is this a known limitation or a bug? Do you have any idea how to solve this problem? ... Id. I Use this query: SELECT c FROM User c WHERE c.id IN :ids This querey works as long as I don't set ... = em. createQuery ( "SELECT e FROM MyEntity e WHERE e.id IN :id" ) ; query1. setParameter ( ...

 
issue

Different behavior for two equal queries

Hi, I've got two equal queries though they behave differently: SELECT FROM com.quasado.foundation.communication.contact.individual.IndividualContact $1 WHERE (($1.organisation.name LIKE '%Q%')) This correctly returns one entry from my database ... . contact . individual . IndividualContact $1 WHERE ( ( $1 . organisation . name LIKE '%Q%' ... . contact . individual . IndividualContact $1 WHERE ( ( $1 . organisation . name LIKE '%Q%' ...

 
forum_thread

Memory leak with OutOfMemoryError exception

Hi, I'm new to using object databases. Currently I'm experience the following error: ... stack traces arent as helpful. The following method is where I suspect the leak is: public List<DailyEntry> ... "SELECT d FROM DailyEntry d " + "where d.symbol = :symbol" , DailyEntry. class ) ; q. ... for each symbol. I am also using VirtualVM where I notice the used heap space continue to grow till the crash. A heap dump ...

 
forum_thread

em.flush(); em.clear(); loosing data and not persisting managed objects

I'm having trouble with flush() and clear() in a loop inside a transaction not persisting modified objects to database. Sometimes it does other times it doesn't. Here is my Entity. ... query="SELECT MAX($1.addDate) FROM Notes $1 WHERE $1.addDate IS NOT NULL" args="null" transactionId="-1" /> [2011-05-05 ... code="1" postion="34:36" /> <token name="WHERE" code="150" postion="37:42" /> <token name="$1" code="1" ... </token> </token> <token name="WHERE" code="150" postion="37:42"> <token name="IS NOT NULL" ...

 
forum_thread

Using Enum type in NamedQuery: Field is not found in type

I'm trying to switch an application that worked fine in Hibernate to ObjectDB and am having issues with queries that reference enum types. On my entity object is a static enum public static enum Type {     A,B,C } that is stored in an @Enumerated member variable private Type type; @Enumerated public Type getType() {     return type; } I then try to query this field in the following JPA Named Query ... , query = "select obj from Obj where obj.type = com.my.fully.qualified.name.Obj.Type.A" ) ... Please try: SELECT o FROM Obj o WHERE o . type = com . my . fully . qualified . name . ...

 
forum_thread

ObectDb 2.3.6 in OSGi environment

Hello, I'm trying to use ObjectDb within OSGi bundles. I have one bundle for db accens which uses ObjectDb and another bundle which includes the POJO models. Everytime I start in plugin evironement i get an PersistenceException, because my POJO not found. If try the same test in normal Java environment everthing works fine. Can you please advice? Thx Peter ... , query = "SELECT rvn FROM RuleValueNode rvn where rvn.parent is null" ) , @ NamedQuery ( name ... , query = "SELECT rvn FROM RuleValueNode rvn where rvn.value.not = true and rvn.parent = :parent" ) , @ ...