About WHERE

forum_thread

No clue how to query with collection

Hi there! Actually, what I have is something like: @Embedable class Address { String getStreet(); int getStreetNo(); } @Entity class Contact { Collection<Address> getAddresses(); }   ... now I can select the right item from the collection with a WHERE clause BUT in this query: SELECT c , a FROM Customer ... JOIN c . addresses a ORDER BY a . street WHERE a . active = true I have the problem that I do also need ...

 
forum_thread

Multiple joins did not return expected result

Hello, I have 3 entity classes: Event - String title Calendar - List<Event> @OneToMany SharedCalendar extends Calendar - Calendar original Now I want to retrieve all events from a specific calendar by its id like: ... event INNER JOIN c2. original . events AS event WHERE c1. id =? 1 OR c2. id =? 1 Unfortunately ... JOIN c2 . original . events AS event2 WHERE c1 . id = ? 1 OR c2 . id = ? 1 instead? ...

 
forum_thread

JPQL IN Operator

How can I use the standard JPQL IN operator with ObjectDB? This JPQL query works fine with EclipseLink / postgres but throws an exception in objectDB: select distinct dv.creationtime from DataValue dv where dv.capabilityId.capabilityId ==> in <== :capabilities and dv.creationtime >= :earliest and dv.creationtime <= :latest order by dv.creationtime ASC [ObjectDB 2.2.9] javax.persistence.PersistenceException Unexpected query token 'in' (error 752) ... DISTINCT dv . creationtime FROM DataValue dv WHERE dv . capabilityId . capabilityId ==> IN <== ... dv.creationtime from DataValue dv" + " where dv.capabilityId.capabilityId member of :capabilities" + " ...

 
forum_thread

OEM Enhancer causing Jenkins job to freeze

Hi all, We are using ODB enhancer in one of our jobs on jenkins, built via ant. Recently we started to encounter situation, where this job's execution gets stuck for ever on Jenkins. This is causing us a lot of problems with our CI. ... built via ant. Recently we started to encounter situation, where this job's execution gets stuck for ever on Jenkins. This is causing ... to enable some detailed logging for enhancer? To see where exactly it gets stuck during it's execution? Also, our ...

 
forum_thread

Navigation through Path to evaluate collection

Hello, I need to evaluate a field ("identifier") which is situated in a collection, within an entity. As stated in the documentation it is not possible to navigate there with the dot operator since its a collection. Is it there a way to evaluate this field? Here is the query, the entity and the related embeddable class. Thanks ... "SELECT item FROM ProductData item " + "WHERE item.sku =: key " + "OR id MEMBER OF :item.apiId.identifier ... FROM ProductData item JOIN item . identifier id WHERE item . sku = : KEY OR id = :id ORDER BY item ...

 
forum_thread

Native ObjectDB Support for EnumSet ?

Greetings ObjectDB team, Are embedded EnumSet objects faster to query than normal classes ? Does JPA/JDO offer native support to filter persistent objects by an EnumSet field's multi values ? For example: WHERE o.es == ES.A | ES.B | ES.C Thank you !... field's multi values ? For example: WHERE o . es == ES . A | ES . B | ES . C Thank ... query for example: SELECT FROM MyEntity WHERE this . enumSet . contains ( :arg ) ...

 
issue

Unexpected Query Token / Casting in Query

Hi! Please find the attached database. Doing a simple query with casting SELECT COUNT(DISTINCT $1) FROM com.quasado.foundation.contact.individual.IndividualContact $1 WHERE UPPER(((com.quasado.foundation.warehouse.api.model.account.contact.IndividualContactDebitorAccountFragment) $1.qubletFRAGMENTMAP.get('com.quasado.foundation.warehouse.api.model.account.contact.IndividualContactDebitorAccountFragment')).debitorAccount.bankAccounts.routingNumber) LIKE UPPER('%28%') results in the error ... . contact . individual . IndividualContact $1 WHERE UPPER ( ( ( com . quasado . foundation . ... . contact . individual . IndividualContact $1 WHERE UPPER ( ( ==> ( com . quasado . ... . contact . individual . IndividualContact $1 WHERE UPPER ( ( ( com . lexware . ...

 
forum_thread

Path in tomcat

Hi, If I put the .jar into /opt/Tomcat/lib/, then where the .conf should be in? And the .odb? When I debug the Eclipse web project, I export all things into a .war file. Then I use Tomcat's web deploy tool by the .war file. However, if I put objectdb into the project's /WEB-INF/, I may lost the db when I use Undeploy tool. TIA ... Hi, If I put the .jar into /opt/Tomcat/lib/, then where the .conf should be in? And the .odb? When I debug the ... > If I put the .jar into /opt/Tomcat/lib/, then where the .conf should be in? And the .odb? See explanations about ...

 
forum_thread

Unexpected COUNT Results

We are working with objectDB version 2.5.5.b01. (we also tried to use the latest version 2.6.1) We have several issues with queries that can be seen with the attached database and using ObjectDB explorer: 1.       Using ObjectDB explorer... SELECT $1.id FROM Pa3DataKey $1 WHERE $1.timestamp <= 187526 AND ($1.dataItems.get('Sender') != ... SELECT COUNT($1.id) FROM Pa3DataKey $1 WHERE $1.timestamp <= 187526 AND ($1.dataItems.get('Sender') != ... SELECT COUNT($1.id) FROM Pa3DataKey $1 WHERE $1.timestamp <= 187526 AND ($1.dataItems.get('Receiver') != ...

 
forum_thread

Help with JPA2 Criteria and conditional operator grouping

Hi,   I'm getting a little trouble performing a query as per the way I had it set up on eclipselink. Essentially, the query I'm trying to generate is: SELECT $1 FROM Company $1 WHERE (($1.companyId=:p1) AND ($1.conditionOne=true)) AND (($1.conditionTwo=false) OR ($1.conditionThree=false))   From the JPA2 criteria: ... trying to generate is: SELECT $1 FROM Company $1 WHERE ( ( $1. companyId =: p1 ) AND ( $1. ... ;   c. select ( root ) ; c. where ( builder. and ( builder. equal ( ...