ObjectDB ObjectDB

Internal Website Search

21-30 of 200 resultsRefresh
181

JPA JPQL WHERE clause for IN :variable not working if variable is a list of Enums

Hi, I have a case where I have a JPQL query like: "select o from MyEntity o WHERE (enumField IN ... :     public enum MyEnumType { VALUE1, VALUE2, VALUE3, VALUE4 } and I call:     query.setParameter("enumFieldList",         Arrays.asList(MyEnumType.VALUE1, MyEnumType.VALUE2)); Then query
35

GROUP BY and HAVING clauses

The GROUP BY clause enables grouping of query results. A JPQL query with a GROUP BY clause returns ... clause in the query execution order is after the FROM and WHERE clauses, but before the SELECT clause. When a GROUP BY clause exists in a JPQL query, database objects (or tuples of database objects
35

ORDER BY clause (JPQL / Criteria API)

"))); Unlike other methods for setting criteria query clauses - the orderBy method takes a variable number ... The ORDER BY clause specifies a required order for the query results. Any JPQL query that does not ... Expressions The following query returns names of countries whose population size
34

Chapter 4 - JPA Queries (JPQL / Criteria)

The JPA Query Language (JPQL) can be considered as an object oriented version of SQL. Users ... well as how to use the JPA Criteria API, which provides an alternative way for building queries in JPA ... (named) queries. It explains how to use the relevant interfaces, annotations, enums and methods
34

Criteria Query Selection and Results

and for representing query results as tuples. SELECT Clause Elements The content of the SELECT clause in a criteria query is represented by Selection: Because Selection is a super interface ... : See the SELECT in Criteria Queries section for more details and examples. ORDER BY Clause Elements Elements in
33

OutOfMemoryError in a query with many variables

of a query. Can you post the query? Does it have a large number of variables (> 20) ? support Support Hi ... doesn't handle well queries with a lot of variables, and complex navigation (e.g. $1.postalAddresses ... . This should be improved in future versions. support Support Build 2.3.7_03 fixes this issue and removes the limitation on the number of variables in a query. support Support
33

Date and Time in JPQL and Criteria Queries

Date and time expressions may appear in JPQL queries: as date and time literals - e.g. {d '2011-12 ... that are evaluated to the date and time on the database server when the query is executed: CURRENT_DATE ... in Criteria Queries The CriteriaBuilder interface provides three factory methods for building date
32

Collections in JPQL and Criteria Queries

Collections may appear in JPQL queries: as parameters - when collections are assigned as arguments ... , which should be used for checking other collections, such as a collection that is passed to the query ... of collection, so in ObjectDB these operators are treated as synonyms. Criteria Query Collection
32

Literals in JPQL and Criteria Queries

literals should be used sparingly as queries that use parameters instead of literals ... values. Literals should only be embedded in JPQL queries when a single constant value is always used ... support for enum literals. Enum literals in JPQL queries use the ordinary Java syntax for enum
32

JPA Annotations for JPQL Queries

The following annotations are used to define static named JPA queries: The JPA Named Queries section of the ObjectDB Manual explains and demonstrates how to use these annotations to define named JPQL queries.

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support