About WHERE

forum_thread

A nested SELECT

Hello. I have a query UPDATE Look l SET l.partlySold = FALSE WHERE (SELECT count(a) FROM l.things a WHERE a.thing.status != :status) <= 1 which doesn't work: "Unexpected query token 'SELECT'". Does ObjectDB support queries like this? Thanks. ... UPDATE Look l SET l . partlySold = FALSE WHERE ( SELECT count ( a ) FROM l . things a WHERE a . thing . STATUS ! = : STATUS ) <= 1 ...

 
issue

Update query bug

Some code. Problem in UPDATE query.   ... ( "SELECT t FROM Person p JOIN p.transports t WHERE p.personalCode = :code" ) ;   query . setParameter ... ( "UPDATE Person p SET p.transports = :list WHERE p.personalCode = :code" , Person . class ) ; query2 . ...

 
forum_thread

Run out of memory

Hi, I've been looking into ObjectDB for our use, where everything has been great apart from I'm stuck on the following problem.   I am trying to load a large file (> 1GB), process certain information and store it back in the database to access / modify later. I require to be able to rollback changes as well, where there can be massive amount of changes.   ... Hi, I've been looking into ObjectDB for our use, where everything has been great apart from I'm stuck on the following ... later. I require to be able to rollback changes as well, where there can be massive amount of changes. I have been storing the ...

 
forum_thread

Wrong select results

Hello, I got a realy strange SELECT problem. In explorer query "select p  from Player p where p.confirmed==false", given me some results with p.confirmed==TRUE. And when I try to do (see image) "select p, p.confirmed  from Player p where p.confirmed==false", I getting p->confirmed->true and p.confirmed->false. How so? <odb v2.6.5_05> And this problem not only in explorer ... problem. In explorer query "select p  from Player p where p.confirmed==false", given me some results with p.confirmed==TRUE. And ... do (see image) "select p, p.confirmed  from Player p where p.confirmed==false", I getting p->confirmed->true and ...

 
forum_thread

Problem with @OrderBy

When I use @OrderBy and supply multiple order fields I get and error when ObjectDB loads that entity. Example code: @Entity @Table(name="Problems", schema = myDB") public class Defects  implements Serializable { ... ...  @OneToMany(mappedBy="problem") @OrderBy("seqRel, noteSeq") Set<Notes> notes; ... ... } ... } The error is printed on the console where I started the Explorer Th error that seems most informative is: ... SELECT owner FROM Notes owner JOIN owner.defect inverse WHERE inverse = ?1 ORDER BY owner.seqRel, ==> noteSeq ...

 
forum_thread

how explorer queries work

i'm curious as to how the explorer is able to execute queries when its obviously not aware of the object model that i built. the reason is because i have an application where i want to be able to execute somewhat generalized queries and i won't know what classes are in the object model ahead of time. this is especially curious to me in client-server mode since the .jar with the object model classes is on the server side, not the client side where explorer is running. ... that i built. the reason is because i have an application where i want to be able to execute somewhat generalized queries and i won't ... model classes is on the server side, not the client side where explorer is running. i can figure out how to load the classes in ...

 
manual

Comparison in JPQL and Criteria API

Explains how comparison operators can be used in JPQL queries, including in comparing null values.... JPQL queries use at least one comparison operator in their WHERE clause. This page covers the following topics: ... the Not Equal operators. JPQL follows the SQL notation, where Java uses its own notation (which is also in use by JDOQL, the JDO Query ...

 
forum_thread

slow performance for a complex query

Hi, We have a query that is constructed dynamically, an example is like this: SELECT DISTINCT $1 FROM CDI $1, Organisation $2, Organisation $3 WHERE ((UPPER($1.cdiId) LIKE 'THREAD14%') AND ((($1.parentOrgId='news') OR (($1.parentOrgId=$2.organisationId) AND ($2.parentOrgId='news'))) OR ((($1.parentOrgId=$3.organisationId) AND ($3.parentOrgId=$2.organisationId)) AND ($2.parentOrgId='news')))) I've also tried running the CDI query first and passing the results into the organisation query as follows: ... FROM CDI $1 , Organisation $2 , Organisation $3 WHERE ( ( UPPER ( $1 . cdiId ) LIKE ... FROM CDI $1 , Organisation $2 , Organisation $3 WHERE ( ( $1 . id IN :cdiids ) AND ( ...

 
forum_thread

Possible issue for JPQL IN expression

Possible issue for JPQL IN expression with a set of more than one string literals values in the path expression. ... thread "main" [ObjectDB 2.3.7_10] SELECT e FROM MyEntity e WHERE e.country IN ('US' ==> , <==  'SP', ... use a parameter: SELECT e FROM MyEntity e WHERE e . country IN :countries and send a collection of ...

 
api-jdo

javax.jdo.annotations.Embedded

Annotation to define that the object is embedded into the table of the owning object.(Annotation of JDO)