About DISTINCT

forum_thread

InternalError on query of empty database

Hi, I have reasons for sometimes trying to query the database before anything has been created. The problem is the database throws a InternalException when that happens. Is it possible to throw something that identifies that that is the issue, say something like "MissingSchemaException", ie something that clearly shows its because no data of that type has been added? This just makes the exception catching cleaner. Thought thinking about it, it probably needs to be a JPA exception, maybe something like javax.persistence.EntityNotFoundException? ... Hi, Query I'm running is: SELECT DISTINCT $1 FROM CDI $1 JOIN $1.attributeList $2 JOIN $1.attributeList $3 WHERE ...

 
issue

Deadlock

Hi, Query: SELECT DISTINCT $1, UPPER($1.name) AS $O0, UPPER($2.lastName) AS $O1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 LEFT JOIN $1.profile $2 WHERE (($1.getClass().getName()='com.lexware.vereinsverwaltung.verein.api.model.mitglied.Mitglied')) ORDER BY $O0, $O1 --> Causes deadlock in server latest revision (> 120% cpu forever) Use one of my latest dbs for testing ... Hi, Query: SELECT DISTINCT $1 , UPPER ( $1 . name ) AS $O0 , UPPER ...

 
forum_thread

First query takes 4+ minutes to complete

Hi, we are evaluating ObjectDB 2.5.1_04 in embedded mode hoping to replace SQLite in our application. We observed that in our case it takes on average more than 4 minutes to complete the first SELECT query that we run on the DB which contains about 320,000 records of a single type of object. SQLite in comparison responds within few seconds on average with the same number of records. We hope to receive your recommendation on how to improve this result with this post.   Test System ... we tried a different query today: SELECT DISTINCT NEW com . arunta . base . db . DateExtensionDTO ( ... ;   String qs = "SELECT DISTINCT NEW com.arunta.base.db.DateExtensionDTO(r.startDate, r.toExtension) ...

 
forum_thread

An InternalException occurs when gets an result list

[ObjectDB 2.6.4_04] Unexpected exception (Error 990) Generated by Java HotSpot(TM) Client VM 1.8.0_51 (on Windows 7 6.1). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: java.lang.NullPointerException: null java.lang.NullPointerException at com.objectdb.o.VAR.S(VAR.java:297) at com.objectdb.o.VAR.R(VAR.java:259) at com.objectdb.o.SYR.y(SYR.java:515) at com.objectdb.o.QRC.x(QRC.java:192) at com.objectdb.o.QRM.Vm(QRM.java:272)... it is actually a simple query: select distinct m from ArchitectureImpl m with query option: ...

 
forum_thread

How to convert a boolean to an int in the query?

How to convert a boolean to an int in the query? I have five parameters of type boolean in the entity object - approveEmail, approvePhoneNumper, ... I can not sort them ORDER BY approveEmail, approvePhoneNumper, .... because the parameters equivalent. I want to sort them in the query by their sum ORDER BY (approveEmail + approvePhoneNumper + ... ) But I get an exception com.objectdb.o._PersistenceException: Invalid operand type boolean for operator + ... on the query for example SELECT DISTINCT m FROM Person m LEFT OUTER JOIN m . answers ...

 
forum_thread

"Problem" with cross join

At first, this is my first JPA Projekt - and the code should work with Hibernate and JPA, using the specifc DAOs. Following query string returns no result using ObjectDB - using Hibernate, or EclipseLink this query works fine. select distinct c from CI c, CIstring s where c.name like :SSTR or (c.id = s.ci.id AND s.text like :SSTR) The class CI (Confiugration Item):...private String name;@OneToMany(mappedBy="ci") private List<CIdata> content;... or EclipseLink this query works fine. select distinct c from CI c, CIstring s where c.name like :SSTR or (c.id = s.ci.id AND ...

 
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. ... run this query on the attached DB: SELECT DISTINCT $1 FROM com . quasado . serviceplaza . customer . ...

 
forum_thread

InternalError on multiple AND and JOIN Query

Hi, Using objectdb 2.2.8_06. Running the following query: SELECT DISTINCT $1 FROM CDI $1 JOIN $1.contactDetails $2 JOIN $2.addresses $3 JOIN $3.attributeList $4 JOIN $2.phoneNumbers $5 JOIN $5.attributeList $6 WHERE ((($4.name='suburb') AND ($4.valueAsString='Los Angeles')) AND (($6.name='areacode') AND ($6.valueAsString='310'))) Getting: ... 2.2.8_06. Running the following query: SELECT DISTINCT $1 FROM CDI $1 JOIN $1.contactDetails $2 JOIN $2.addresses $3 JOIN ...

 
issue

Critical error:: com.objectdb.o.InternalException: Unexpected internal exception with query

This is the query on the attached db (run in explorer): SELECT DISTINCT $1 FROM com.quasado.foundation.warehouse.payment.Payment $1 LEFT JOIN $1.receivable $2 WHERE (( ((($2 IS NOT NULL) AND ($2.receiver.qubletId=22))))) and this is the result: ... on the attached db (run in explorer): SELECT DISTINCT $1 FROM com . quasado . foundation . warehouse . payment ...

 
forum_thread

Why the internal error was thrown?

com.objectdb.o.InternalException at com.objectdb.o.CCH.H(CCH.java:298) at com.objectdb.o.CCH.E(CCH.java:155) at com.objectdb.o.QRM.Vo(QRM.java:226) at com.objectdb.o.MST.Vo(MST.java:988) at com.objectdb.o.WRA.Vo(WRA.java:311) at com.objectdb.o.WSM.Vo(WSM.java:115) at com.objectdb.o.QRR.g(QRR.java:247) at com.objectdb.o.QRR.f(QRR.java:153) at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719) ... . getModelElementsByQuery ( "select distinct m from " + PoolImpl. class . getName ( ) + ...