ObjectDB Database Search
1-50 of 200 resultsJPA Query Structure (JPQL / Criteria) and FROM clauses are mandatory. The FROM clause declares one or more query variables , also known as identification variables . Query variables are similar to loop variables in programming languages. Each query variable represents an iteration over objects in the database. A query variable that is bound | |
DELETE Queries in JPA/JPQL + an optional variable ObjectDB supports using the java.lang.Object class in queries as an extension ... operation. Apply changes to the database by calling the commit method. JPQL DELETE queries provide an alternative way to delete entities. Unlike SELECT queries , which retrieve data from the database | |
FROM clause (JPQL / Criteria API) The FROM clause declares query identification variables for iterating over objects in the database. A query identification variable is similar to a variable in a Java enhanced for loop because both are used to iterate over objects. Range variables Range variables are query identification variables | |
JPA Query Expressions (JPQL / Criteria) Criteria API expressions. Atomic expressions The atomic query expressions are: JPQL / Criteria Variables JPQL / Criteria Parameters JPQL / Criteria Literals Every query expression consists ... JPQL and criteria queries are built on query expressions. Every query consists of clauses | |
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 ... ; query .setParameter("enumFieldList", Arrays.asList(MyEnumType.VALUE1, MyEnumType.VALUE2)); Then query .getResultSet() *always* returns an empty list | |
Setting and Tuning of JPA Queries The Query and TypedQuery interfaces define various methods for setting and tuning query execution . To take effect, you must invoke these methods before running a query with getResultList or ... let you define a result window, which is a portion of a large query result list. The setFirstResult | |
Query Parameters in JPA Query parameters enable you to define reusable queries . You can execute these queries with different parameter values to retrieve different results. Executing the same query multiple times with different parameter values is more efficient than using a new query string for each execution | |
JPA Named Queries A named query is a statically defined query with a predefined, unchangeable query string. Using named queries instead of dynamic queries can improve code organization by separating JPQL query strings from Java code. This practice also enforces the use of query parameters instead of embedding | |
JPA Query API Jakarta Persistence (JPA) represents queries with two interfaces: the Query interface, which was the only query interface in JPA 1, and the TypedQuery interface, which was introduced in JPA 2. The TypedQuery interface extends the Query interface. Use the Query interface primarily when the query | |
JPA Queries Jakarta Persistence provides powerful APIs for executing database queries using JPQL strings or the programmatic Criteria API. These interfaces support both static and dynamic query construction with full type safety. General query objects Execute SELECT, UPDATE and DELETE queries in JPA using | |
JPA Criteria Queries to string-based JPQL for constructing dynamic queries , ensuring compile-time safety and facilitating ... queries : Criteria Queries Hierarchy in Jakarta Persistence (JPA) 3.2 Instances of  ... of CriteriaBuilder as mutable empty objects, and then defined using setter methods. All query types (SELECT | |
JPA Criteria Query Expressions Jakarta Persistence (JPA) Criteria API uses a hierarchy of interfaces to model query conditions and selections, enabling the construction of dynamic, type-safe queries . These interfaces represent the building blocks for defining query logic programmatically. The hierarchy of the expression | |
JPA Named Queries Annotations Jakarta Persistence (JPA) provides annotations to define static, reusable queries at the class level, separating query logic from business code. Query definitions Declare named queries using the following annotations: Specifies a static, named query in the Jakarta Persistence Query Language (JPQL | |
SQL Queries Annotations Jakarta Persistence (JPA) provides a set of annotations to define and map native SQL queries when the standard Java Persistence Query Language (JPQL) is insufficient. While ObjectDB focuses on JPQL ... databases through specific SQL dialects. Native query definitions Define raw SQL queries using | |
Strings in JPQL and Criteria Queries String values can appear in JPQL queries in several forms: As string literals , for example, 'abc' and '' . As parameters when string values are passed as query arguments. As path expressions ... . Criteria query string expressions Query String Expressions The JPQL string operators and functions | |
Date and Time in JPQL and Criteria Queries Date and time expressions can appear in JPQL queries in the following ways: As date and time ... when the query is executed: CURRENT_DATE : Returns the current date as a java.sql.Date instance. CURRENT_TIME ... . Date and time in criteria queries The CriteriaBuilder interface provides three factory methods | |
Collections in JPQL and Criteria Queries Collections can appear in JPQL queries in the following ways: As parameters when a collection ... to check other collections, such as a collection passed as a query parameter. For example: 'English' IN ... are synonyms. Criteria query collection expressions The JPQL collection operators and functions | |
Literals in JPQL and Criteria Queries type literals (for example, Country ). Use JPQL literals sparingly. Queries that use parameters ... times with different parameter values. Embed literals in JPQL queries only when a single, constant ... '} . For example: {ts '2020-01-03 13:59:59'} Enum literals Enum literals in JPQL queries use the standard Java | |
WHERE clause (JPQL / Criteria API)- variable queries In a multi- variable query , the FROM clause defines an iteration over tuples. In ... . In multi- variable queries , the number of tuples for iteration can be very large even if the database ... for retrieving a specific subset of objects from the database. How a WHERE clause works The following query | |
Numbers in JPQL and Criteria Queries Numeric values can appear in JPQL queries in several forms: As numeric literals , such as 123 ... type and always returns a double value. Criteria query arithmetic expressions JPQL arithmetic operators and functions (which are described above) are available also as JPA criteria query expressions | |
JPA Runtime Tuning & Configuration dynamic options that control runtime behavior and allow you to adjust settings per session, query , or ... every operation in that session. Query (definition): Settings applied to a Query object override session defaults for that query . Operation (argument): Settings passed to specific EntityManager operations ( find | |
JPA Criteria Query Date/Time Extraction Jakarta Persistence criteria queries use the following interfaces and enums to extract temporal components like year, month, or hour from date and time values. TemporalField # Base interface ... a criteria query specify the enum value that represents that component as the first argument of  | |
SELECT clause (JPQL / Criteria API) query returns Country objects, which then become managed by the EntityManager instance em : TypedQuery query = em. createQuery ("SELECT c FROM Country c", Country.class); List results = query ... for deletion , and so on. Query results are not limited to entities. You can use almost any valid JPQL | |
JPA Persistable Types no-argument constructor. Must not be final and must not have final methods or final instance variables ... classes are not. Instance (non-static) variables cannot be `final`, but classes and methods ... are represented in queries by entity names . By default, the entity name is the unqualified name | |
Logical Operators in JPQL and Criteria API Logical operators in JPQL and JPA criteria queries combine simple Boolean expressions to form ... , while Java uses its own notation, which is also used by the JDO Query Language (JDOQL). ObjectDB supports both notations. Binary AND (&&) operator The following query retrieves countries whose population | |
JPA Metamodel and Graphs objects that can be bound to a Path in a Criteria query , mainly to define FROM variables ... , and their attributes to build dynamic queries and validate persistence structures. The Metamodel Access ... and further explanation, refer to the JPA Metamodel API section in the ObjectDB manual. Criteria query | |
jakarta.persistence.EntityManagerFactory.addNamedQuery(String,Query) ( String name , Query query ) Define the query , typed query , or stored procedure query as a named query such that future query objects can be created from it using ... of the query object (except for actual parameter binding) in effect when the named query is added | |
jakarta.persistence.QueryTimeoutException.QueryTimeoutException(Query) Jakarta Persistence (JPA) Constructor in jakarta.persistence.QueryTimeoutException QueryTimeoutException ( Query query ) Constructs a new QueryTimeoutException exception with the specified query . Parameters: query - the query . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.QueryTimeoutException.QueryTimeoutException(String,Throwable,Query) QueryTimeoutException ( String message , Throwable cause , Query query ) Constructs a new QueryTimeoutException exception with the specified detail message, cause, and query . Parameters: cause - the cause. message - the detail message. query - the query . Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.QueryTimeoutException.query Jakarta Persistence (JPA) Field in jakarta.persistence.QueryTimeoutException query Since: Jakarta Persistence (JPA) 1.0 | |
Obtaining a JPA Database Connection to be a database URL rather than a persistence unit name. The $objectdb variable represents the ObjectDB home | |
jakarta.persistence.criteria.PluralJoin query construction. Since: Jakarta Persistence (JPA) 2.0 Public Instance Methods Selection alias ... to avoid the use of Path variables . For example: CriteriaQuery q = cb.createQuery(Person.class); Root p ... a compound selection. Modifications to the list do not affect the query . Inherited from Selection | |
jakarta.persistence.criteria.Root , TupleElement A root type in the from clause. Query roots always reference entities. Since: Jakarta ... the Path.get operation in order to avoid the use of Path variables . For example: CriteriaQuery q = cb ... a compound selection. Modifications to the list do not affect the query . Inherited from Selection Returns | |
jakarta.persistence.TypedQuery Jakarta Persistence (JPA) Interface jakarta.persistence.TypedQuery Type Parameters: - query result type Super Interfaces: Query Interface used to control the execution of typed queries . See Also: Query Parameter Since: Jakarta Persistence (JPA) 2.0 Chapter 4 - JPA Queries (JPQL / Criteria | |
jakarta.persistence.criteria.MapJoin of Path variables . For example: CriteriaQuery q = cb.createQuery(Person.class); Root p = q.from ... selection. Modifications to the list do not affect the query . Inherited from Selection Returns: list ... if no fetch joins have been made from this type. Modifications to the set do not affect the query | |
jakarta.persistence.criteria.SetJoin the use of Path variables . For example: CriteriaQuery q = cb.createQuery(Person.class); Root p = q.from ... a compound selection. Modifications to the list do not affect the query . Inherited from Selection Returns ... the query . Inherited from FetchParent Returns: fetch joins made from this type. Since: Jakarta Persistence | |
jakarta.persistence.criteria.CollectionJoin.get operation in order to avoid the use of Path variables . For example: CriteriaQuery q = cb.createQuery ... the selection items composing a compound selection. Modifications to the list do not affect the query ... to the set do not affect the query . Inherited from FetchParent Returns: fetch joins made from this type | |
Database Management Settings, which modify the database. For debugging query failures, you might need to record "all" operations to reproduce ... can use the new indexes to accelerate relevant queries . The element The element specifies settings for the two query cache mechanisms that ObjectDB manages: The results attribute specifies the size | |
jakarta.persistence.Entity with no parameters, and have no final methods or persistent instance variables . An enum, record, or ... of the entity class. This name is used to refer to the entity in queries . The name must not be a reserved literal in the Jakarta Persistence query language. Default: "" Since: Jakarta Persistence (JPA) 1.0 | |
jakarta.persistence.criteria.Path the use of Path variables . For example: CriteriaQuery q = cb.createQuery(Person.class); Root p = q.from ... the selection items composing a compound selection. Modifications to the list do not affect the query | |
JPA Entity Fields an automatic query when the entity is retrieved. Note : Navigation through inverse fields is much less efficient than navigation through ordinary persistent fields because it requires running queries ... the following query , where :d represents the Department entity: SELECT e FROM Employee e WHERE e.department | |
Retrieving JPA Entities its persistence context, it returns the existing managed object without querying the database. Otherwise, JPA ... , getReference might return a hollow object instead of querying the database immediately. It never returns null ... an entity and another for checking a persistent field of an entity. Retrieval by query The Query | |
Index Definition Querying without indexes requires sequential iteration over entities in the database. If many ... this full iteration, allowing complex queries over millions of objects to execute quickly ... lastName; Address address; : } Indexes in queries ObjectDB manages a B-tree for every index. A B-tree | |
jakarta.persistence.EntityManager their primary key, and execute queries which range over entity types. An entity may be disassociated from ... must also be flushed before execution of any query whose result set would be affected by unflushed modifications ... accepts LockOption s. See Also: Query TypedQuery CriteriaQuery PersistenceContext | |
Is ObjectDB better than competing object databases? do not support aggregate queries (max, min, count, sum and avg). ObjectDB supports rich queries , including aggregate queries , as part of its support of JPQL (JPA Query Language) and JDOQL (JDO Query Language). ObjectDB is faster than other products. | |
JPA Extended API Reference Guide, query facilities, metamodel details, configuration options, annotations, and exception information ... the fundamental classes and interfaces for entity management and persistence operations. Covers the query API, criteria queries , and JPQL for data retrieval and manipulation. Describes the metamodel and graph APIs | |
What are the main benefits of using ObjectDB? processes JPQL (JPA Query Language) and JDOQL (JDO Query Language) queries directly, where ORM tools first convert these queries to SQL and then transition the SQL to the DBMS for execution through a JDBC | |
jakarta.persistence.criteria.Subquery a subquery root correlated to a root of the enclosing query . Parameters: parentRoot - a root of the containing query Returns: subquery root. Since: Jakarta Persistence (JPA) 1.0 Join correlate ( Join parentJoin ) Create a subquery join object correlated to a join object of the enclosing query | |
jakarta.persistence.criteria.CriteriaBuilder criteria queries , compound selections, expressions, predicates, orderings. Note that Predicate ... compatible with varags. Since: Jakarta Persistence (JPA) 2.0 The JPA Criteria API Queries article ... to specify a constructor that is applied to the results of the query execution. If the constructor | |
queries under 2.7.6_4 significantly slower than under 2.7.6 indicating deep query plan checks and an overall significant performance loss in all queries ... since version 2.7.6 that could possibly effect query execution. Could you please explain or post some of these logs that show deep query plan checks (and are new in 2.7.6_04)? In addition |