Internal Website Search
1-50 of 77 resultsSELECT clause (JPQL / Criteria API) less memory. SELECT DISTINCT Queries that use projection may return duplicate results. For example ... easily in JPQL by using the DISTINCT keyword: SELECT DISTINCT c.currency FROM Country AS c WHERE c.name LIKE 'I%' The only difference between SELECT and SELECT DISTINCT is that the later filters | |
Subquery.distinct(distinct) - JPA Method JPA Method in javax.persistence.criteria.Subquery Subquery distinct ( boolean distinct ) Specify whether duplicate query results will be eliminated. A true value will cause duplicates to be eliminated. A false value will cause duplicates to be retained. If distinct has not | |
AbstractQuery | |
CriteriaQuery.distinct(distinct) - JPA Method JPA Method in javax.persistence.criteria.CriteriaQuery CriteriaQuery distinct ( boolean distinct ) Specify whether duplicate query results will be eliminated. A true value will cause duplicates to be eliminated. A false value will cause duplicates to be retained. If distinct | |
GROUP BY and HAVING clauses) are sent to grouping by the GROUP BY clauses before arriving at the SELECT clause. GROUP BY as DISTINCT ... calculations - the GROUP BY functions merely as a DISTINCT operator. For example, the above query (which does not use aggregates) is equivalent to the following query: SELECT DISTINCT SUBSTRING(c.name, 1 | |
Problem with distinct select, order by and equivalent alias/attribute path; String q1 = "select distinct s_location "   ... ; q1 = "select distinct s.location "   ... ; String q2 = "select distinct s.location "   | |
Multi selection and distinct in a criteria query hi, How can I realize multi selection with the criteria api concerning distinct ? I.e. doing something like SELECT DISTINCT $1, $2 wouldn't work because I do only have something like criteria.multiselect(...) and nothing like builder. distinct (selection) so that I could do something like criteria | |
Distinct Error Hi, I'm getting a NullPointerException thrown on using DISTINCT . The query works fine if I don't have distinct . However thats NOT a solution as the code generating the query is used for other queries, and some of them do need the distinct . Its only a simple query: QUERY: SELECT DISTINCT $1 FROM | |
ObjectDB internal error on 2.6.4.b10 for query with DISTINCT I observed that on new ObjectDb v.2.6.4.b10 query below causes internal exception SELECT DISTINCT $1 FROM Pa3DictionaryItem $2 JOIN $2.values $1 WHERE ($2.namespace == 'com.anritsu.pa3.ttcn3' AND $2 ... Could you comment this? Raised issue: Issue #1176 - DISTINCT key causing internal exception on 2.6.4 | |
FROM clause (JPQL / Criteria API)_TIME, CURRENT_TIMESTAMP,DELETE, DESC, DISTINCT , ELSE, EMPTY, END, ENTRY, ESCAPE, EXISTS, FALSE, FETCH | |
JPA Query Structure (JPQL / Criteria) criteria query clauses are provided as follows: Criteria SELECT ( select , distinct | |
JPA Criteria API Queries: SELECT clause ( select , distinct , multiselect , array , tuple , construct ). FROM clause ( from | |
Issue with DISTINCT Select It is getting more and more frustrating :( We've introduced distinct select instead of regular ... expression '$3' for distinct results at com.objectdb.o.MSG.d(MSG.java:61) at com.objectdb.o.QNF.l(QNF ... more meaningful. support Support hi, Well, the query works perfect without using distinct select so I doubt | |
DISTINCT key causing internal exception on 2.6.4.b10 I observed that on new ObjectDb v.2.6.4.b10 query below causes internal exception SELECT DISTINCT $1 FROM Pa3DictionaryItem $2 JOIN $2.values $1 WHERE ($2.namespace == 'com.anritsu.pa3.ttcn3' AND $2 ... since it's worked on prev ObjectDb releases, the problems not in '', just remove DISTINCT | |
Searching lists within objects; String query = "SELECT DISTINCT t FROM com.contextspace.datamodel.party.CDI t JOIN t.attributeList attr ... ; query = "SELECT DISTINCT t FROM com.contextspace.datamodel.party.CDI t JOIN t ... ; query = "SELECT DISTINCT t FROM com.contextspace.datamodel.party.CDI t | |
com.objectdb.o.NLV cannot be cast to com.objectdb.o.RSV Hello! This query is working fine SELECT DISTINCT $1 FROM ChatHistoryItem $1 JOIN $1.recipient $2 ... "com.objectdb.o.NLV cannot be cast to com.objectdb.o.RSV" SELECT DISTINCT $1 FROM ChatHistoryItem $1 ... I can confirm that the following query causes an exception: SELECT DISTINCT $1 FROM ChatHistoryItem | |
JPA query of a Set of terms that are already persisted. em.createQuery( "SELECT DISTINCT si.page FROM SearchIndex si ... that are already persisted. TypedQuery query = em.createQuery( "SELECT DISTINCT si.page FROM SearchIndex si ... .createQuery( "SELECT DISTINCT p FROM Page p, SearchIndex s1, SearchIndex s2 " +   | |
Left join fetch behaviour doesn't retrieve children?; em.createQuery("SELECT DISTINCT m FROM MyEntity m JOIN FETCH m.entityChildren ... ; "SELECT DISTINCT m FROM MyEntity m JOIN FETCH m.entityChildren",   ... some cases doing left join (+ distinct ) retrieve less parent entities than no left join fetch. Example | |
javax.persistence.criteria.CriteriaQuery CriteriaQuery . Public Methods CriteriaQuery distinct (boolean distinct ) Specify ... value will cause duplicates to be retained. If distinct has not been specified, duplicate results ... . Parameters: distinct - boolean value specifying whether duplicate results must be eliminated from | |
javax.persistence.criteria.AbstractQuery of restrictions. Since: JPA 2.0 Public Methods AbstractQuery distinct (boolean distinct ) Specify ... . A false value will cause duplicates to be retained. If distinct has not been specified, duplicate results must be retained. Parameters: distinct - boolean value specifying whether duplicate results | |
javax.persistence.criteria.Subquery distinct (boolean distinct ) Specify whether duplicate query results will be eliminated. A true ... . If distinct has not been specified, duplicate results must be retained. This method only overrides the return type of the corresponding AbstractQuery method. Parameters: distinct - boolean value | |
@ElementCollection query returning extra result per element in collection an explicit DISTINCT as a workaround until a fix is released: query.select(companyRoot). distinct (true ... . Similarly, selection of only companies may return duplicate objects if DISTINCT is not specified ... queries). THe distinct condition is easy to add to my entities, but not so easy to add | |
javax.persistence.criteria.CriteriaBuilder countDistinct ( Expression x) Create an aggregate expression applying the count distinct operation. Parameters: x - expression representing input value to count distinct operation Return: count distinct | |
CriteriaBuilder.countDistinct(x) - JPA Method JPA Method in javax.persistence.criteria.CriteriaBuilder Expression countDistinct ( Expression x ) Create an aggregate expression applying the count distinct operation. Parameters: x - expression representing input value to count distinct operation Return: count distinct expression Since: JPA 2.0 | |
multiple LEFT JOINs do not work as expected looks like this: SELECT DISTINCT $1 FROM Organisation $1 JOIN $1.attributeList $2 LEFT JOIN $1.parentOrg ... ; "SELECT DISTINCT n1 " + "FROM Node n1 ... DISTINCT n1 " + "FROM Node n1 LEFT JOIN n1.parent n2 LEFT JOIN n2.parent n3 " + "WHERE n1.nodeId | |
Query with FETCH JOIN returns multiple results instead of one. You should be able to filter duplicates with DISTINCT : SELECT DISTINCT d FROM Demand d JOIN FETCH d.services ... spec clearly mentions that duplicates are not filtered unless DISTINCT is used, but many JPA | |
Issue with upper? Hi, Query 1: SELECT DISTINCT $1, $2.lastName AS $O0 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 LEFT JOIN $1.profile $2 ORDER BY UPPER($2.lastName) Correctly returns all the different lastName's for each $1 Now the same but with upper SELECT DISTINCT $1, UPPER($2.lastName) AS | |
Lazy Init / Eager / Join Fetch collection strategy ? What to choose ? different. Is an "All eager strategy" more efficient that many join fetch ( cartesian product + distinct ... strategy" more efficient that many join fetch (cartesian product + distinct )? So ... "Eager fetch | |
Updating Entities EntityManagers are in fact distinct objects and not one and the same even if persisted from a single object ... . Original Problem: I have 2 EntityManagers that contain a distinct Entity each: Employee and Paygrade | |
First query takes 4+ minutes to complete. Also, we tried a different query today: SELECT DISTINCT NEW com.arunta.base.db.DateExtensionDTO(r.startDate ... List dtoList = new ArrayList(); String qs = "SELECT DISTINCT NEW com.arunta.base.db.DateExtensionDTO | |
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 ... follows: SELECT DISTINCT $1 FROM CDI $1, Organisation $2, Organisation $3 WHERE (($1.id IN :cdiids | |
Multi-tenant capability with hierarchies on how to access two different db files or how to distinct tenants in one file from one application? Thanks ... ;is there an example on how to access two different db files or how to distinct tenants in one file | |
can removing an entity throw an exception if the entity is in use? reference to a specific Entity? FastModel Ben Schreiber You can try something like: SELECT DISTINCT b FROM ... : SELECT DISTINCT b FROM B b WHERE :a = b.a OR :a MEMBER OF b.list ... support Support | |
EM close causes an exception case, you have 2 distinct tmp directories for the 2 JVMs (if possible, empty the root tmp directory before starting). Temporary directories should be distinct and locked per JVM. However, if for some | |
query hint: SELECT DISTINCT o from ObjectNode o join o.properties p1 join o.properties p2 join o.properties p3 ... ) @Index public List linkedObjects = new ArrayList (); the query is: SELECT DISTINCT o from | |
Using aliases in WHERE clause Hi, I'm trying to run query : SELECT DISTINCT ppi.inquiries AS i FROM ProjectPartInfo ppi WHERE i.status IS NOT NULL Unfortunately, 'i' alias doesn't work in WHERE clause : Query Execution Error ===================== Unexpected query token 'i' SELECT DISTINCT ppi.inquiries AS i FROM | |
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 = :earliest and dv.creationtime = :earliest"   | |
InternalError on query of empty database Support Hi, Query I'm running is: SELECT DISTINCT $1 FROM CDI $1 JOIN $1.attributeList $2 JOIN $1 | |
combined index not used query: (version 2.7.6 it takes 47 ms, version 2.8.0_02 it takes 700 ms): SELECT DISTINCT o.parentNode ... .ArrayIndexOutOfBoundsException: 2' exception on executing this query what we never had before: SELECT DISTINCT o from ... to go the direction it goes in 2.7.6 ?): SELECT DISTINCT o from ObjectNode o join o.properties p1 join o | |
Strange Error with Criteria API and Sorting We're creating a simple selection ( distinct ) including an order clause. When watching the created criteria in debugger we get the correct expression: SELECT DISTINCT $1 FROM MyEntity $1 WHERE ((TYPE ... .objectdb.o.UserException: Invalid order expression '$2' for distinct results at com.objectdb.o.MSG.d | |
Query Execution Error This query SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 LEFT ... which has worked just fine before!!! See this more simple query (no collection and the such) SELECT DISTINCT $1 ... check for map return first as there might be null values): SELECT DISTINCT $1 FROM com.lexware | |
queries under 2.7.6_4 significantly slower than under 2.7.6. What we can report is: using a reference query (you have our test db) select distinct o from ObjectNode o join o ... : select distinct o from ObjectNode o join o.properties p1 where o.classIdentifier = "(OP)" and ((o ... : select distinct o from ObjectNode o join o.properties p1 where o.classIdentifier = "(OP)" and ((o | |
each 1-2 days objects on some objectdb level lock/block each other.doubleValue = 1) and (p1.name = 'plannedState' and p1.doubleValue 0) select distinct o from ... " and p2.doubleValue = 0))) select distinct o from ObjectNode o join o.properties p1 join o ... .doubleValue != 13) and (p1.name = 'plannedState' and p1.doubleValue 0 ) select distinct o from | |
InternalException when using MEMBER OF on a large list in a query propertyClassName = propertyClass.getName(); String query = "SELECT DISTINCT property.uid FROM ... , if I add an unless condition. That means the following query don't works: "SELECT DISTINCT ... DISTINCT property.uid FROM CovPropImpl AS property, CovRecImpl AS record WHERE 3 4 AND property.uid MEMBER | |
Different behavior for casting and not casting a few entities: SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 WHERE $1 ... NO entities: SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 ... is resolved: SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 WHERE ((com | |
Internal Exception during query execution one might think of: SELECT DISTINCT $1, UPPER($1.name) AS $O0 FROM com.quasado.foundation.contact ... previously.. alex quasado Alexander Adam Note: Without order by works perfectly: SELECT DISTINCT $1 | |
ClassCastException in Tuple.get("services"); joinDemandingPerson.fetch("account"); cq.multiselect(joinDemand, rootDemandAnswer). distinct ... index and by alias works: cq.multiselect(joinDemand.alias("d"), rootDemandAnswer.alias("a")). distinct | |
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 ... ( DISTINCT $1) FROM com.quasado.foundation.contact.individual.IndividualContact $1 WHERE UPPER | |
queries more than 10 times slower using 2.8.1 versus 2.7.6 in 2.7.6 around 5-10 seconds takes in 2.8.1 around 150-200 seconds: SELECT DISTINCT o.parentNode ... = 'TECHNOLOGY')" 2.7.6, 3 seconds 2.8.1, 16 seconds query 2: "select distinct o from ObjectNode o | |
New issues with queries using build 2.7.6_08 which has an executionConfig with uid = '23A' the query engine ignores this condition and select all records. SELECT DISTINCT ... : SELECT DISTINCT verdict FROM com.btc.ep.analysis.verdict.bl.internal.dmos.VerdictImpl as verdict, com |