ObjectDB Database Search

1-50 of 200 results

GROUP BY and HAVING clauses

is to GROUP BY what the WHERE & nbsp ;clause is to FROM. In ObjectDB, the HAVING clause ... The GROUP BY clause groups query results. A JPQL query with a GROUP BY clause returns properties of the resulting groups instead of individual objects and fields. In the query execution order

Group by date / time

Hi, I'm trying to create reporting query that will return entities grouped by year / mont / day ... WHERE YEAR(record_date) = 2009 GROUP BY YEAR(record_date), MONTH(record_date) or maybe something like this: SELECT COUNT(id) FROM stats WHERE YEAR(record_date) = 2009 GROUP BY DATE_FORMAT(record_date

Help with JPA2 Criteria and conditional operator grouping

;& nbsp ;))); & nbsp ; System.out.println("Query: " + c); But I can can never get the grouping to occur ... . support Support That fixed the conditional grouping issue. Thanks. & nbsp ; There is a new problem now however, I'll create a new post Willks William ... Hi, & nbsp ; I'm getting a little trouble performing a query as per the way I had it set

Grouping by date()

have to group by date(). For few queries I was concatenating 'date' from year()-month()-day() calls ... & nbsp ;in queries: DATE(ts) - Extracts the date part (year, month, day) as a Date instance. TIME(ts) - Extracts the time part (hour, minute, second, millisecond)& nbsp ;as a Date instance. Please try

ObjectDB Object Database Features

. Configurable JPA eager/lazy fetch & nbsp ;and JPA query FETCH JOIN . Configurable JDO fetch groups . Ease ... , derived attributes, grouping queries and aggregate queries) which are usually missing from Object Oriented ... integration with Tomcat, Jetty, GlassFish, WildFly,& nbsp ;Spring MVC and Spring Boot. Operating Modes

ObjectDB Roles and Groups

Hello, How can I incorporate roles/ group in ObjectDB config file? I see no support for this. For example, I would like to place several users under a given group or role, but I see no way of doing this as no such element is present & nbsp ;in the config file. Is it possible to have this? st.clair

jakarta.persistence.PersistenceConfiguration.VALIDATION_GROUP_PRE_PERSIST

Jakarta Persistence (JPA) Field in jakarta.persistence.PersistenceConfiguration VALIDATION_ GROUP _PRE_PERSIST Target groups for validation at PrePersist . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.PersistenceConfiguration.VALIDATION_GROUP_PRE_UPDATE

Jakarta Persistence (JPA) Field in jakarta.persistence.PersistenceConfiguration VALIDATION_ GROUP _PRE_UPDATE Target groups for validation at PreUpdate . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.PersistenceConfiguration.VALIDATION_GROUP_PRE_REMOVE

Jakarta Persistence (JPA) Field in jakarta.persistence.PersistenceConfiguration VALIDATION_ GROUP _PRE_REMOVE Target groups for validation at PreRemove . Since: Jakarta Persistence (JPA) 1.0

Group by: list if no aggregate function is specified

Hello! In a query like SELECT parent, children FROM Parent parent LEFT JOIN p.children children GROUP BY parent& nbsp ; maybe it would be good if it will return a list of Object[2], where the second object is a list of children& nbsp ;of a parent. Because creating a query to get a list of parents

JPA Persistence Unit

A JPA persistence unit is a logical grouping of user-defined persistable classes (entity classes ... (PersistenceConfiguration) Starting with& nbsp ; JPA 3.2 , it is no longer mandatory to use a& nbsp ; persistence.xml & nbsp ... using the& nbsp ; jakarta.persistence.PersistenceConfiguration & nbsp ;interface. This is particularly

ORDER BY clause (JPQL / Criteria API)

Grouping ( GROUP BY) order The ORDER BY clause is always the last clause in the query processing chain. If a query contains both a GROUP BY clause and an ORDER BY clause, the GROUP BY clause first aggregates the results into groups . The ORDER BY clause then sorts these groups . For example: SELECT c

Auto Generated Values

strategies. The AUTO& nbsp ;strategy ObjectDB maintains a global number generator for each database. This generator creates automatic object IDs for entities& nbsp ;that do not have defined primary key ... a primary key for each new& nbsp ;entity. These generated values are unique at the database level

JPA Criteria Queries

to string-based JPQL for constructing dynamic queries,& nbsp ;ensuring compile-time safety and facilitating ... queries: Criteria Queries Hierarchy in Jakarta Persistence (JPA) 3.2& nbsp ; Instances of& nbsp ; CriteriaQuery , CriteriaUpdate , and& nbsp ; CriteriaDelete are first built by static methods

Chapter 4 - JPA Queries (JPQL / Criteria)

and the Jakarta Persistence& nbsp ;(JPA) Criteria Query API, which provides an alternative way to build queries in ... clauses: SELECT , FROM , WHERE , GROUP BY , HAVING , and ORDER BY : The next section explains

JPA Entity Fields

superclasses) can be classified into the following five groups : Transient fields Persistent fields Inverse ( mappedBy ) fields Primary key (ID) fields Version field The first three groups (transient ... . However, the last two groups (primary key and version fields) can be used only in entity classes. Primary key

JPA Query Structure (JPQL / Criteria)

of up to six clauses in the following format: SELECT ... FROM ... [WHERE ...] [ GROUP BY ... [HAVING ... and delete queries have a slightly different structure. The other JPQL clauses-- WHERE , GROUP BY ... ) Criteria WHERE ( where ) Criteria GROUP BY / HAVING ( groupBy , having , count , sum , avg , min

Paths and Types in JPQL and Criteria API

. This is an aggregate query with no GROUP BY clause, so all the objects are considered as one group ... expressions in the preceding code can be divided into two main groups : FROM variable expressions

SQL Queries Annotations

dialect. Groups multiple @NamedNativeQuery definitions on a single class. Result set mapping Map ... how the result set of a native query maps to entities, scalar values, or constructor results. Groups

Posting Sample Code

test; import java.util.*; import jakarta.persistence.*; public final class MyTestCase { & nbsp ;& nbsp ;& nbsp ; public static void main(String[] args) { & nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ; EntityManagerFactory emf = & nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ;& nbsp ; Persistence

jakarta.persistence.criteria.Subquery

() Return a list of the grouping expressions. Returns empty list if no grouping expressions ... : the list of grouping expressions. Since: Jakarta Persistence (JPA) 1.0 Predicate getGroupRestriction () Return the predicate that corresponds to the restriction(s) over the grouping items, or null

jakarta.persistence.criteria.AbstractQuery

(JPA) 1.0 List getGroupList () Return a list of the grouping expressions. Returns empty list if no grouping expressions have been specified. Modifications to the list do not affect the query. Returns: the list of grouping expressions. Since: Jakarta Persistence (JPA) 1.0 Predicate

jakarta.persistence.criteria.CriteriaQuery

getGroupList () Return a list of the grouping expressions. Returns empty list if no grouping ... AbstractQuery Returns: the list of grouping expressions. Since: Jakarta Persistence (JPA) 1.0 Predicate getGroupRestriction () Return the predicate that corresponds to the restriction(s) over the grouping items

Step 1: Create a Maven Web Project

Name (e.g. Guestbook ) and select Java EE 5. Enter Maven Group Id (e.g. com.objectdb.tutorial.spring ... .tutorial.spring Guestbook war 1.0 Guestbook http://maven.apache.org & nbsp ; UTF-8 & nbsp ; & nbsp ;& nbsp ; objectdb & nbsp ;& nbsp ; ObjectDB Repository & nbsp ;& nbsp ; https://m2.objectdb.com & nbsp ; & nbsp ; & nbsp

jakarta.persistence.criteria.AbstractQuery.groupBy(List)

groupBy ( & nbsp ;& nbsp ; List grouping ) Specify the expressions that are used to form groups over the query results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions are simply removed. Parameters: grouping

jakarta.persistence.criteria.Subquery.groupBy(Expression...)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Subquery Subquery groupBy ( & nbsp ;& nbsp ; Expression ... grouping ) Specify the expressions that are used to form groups over the subquery results. Replaces the previous specified grouping expressions, if any. If no grouping

jakarta.persistence.criteria.AbstractQuery.groupBy(Expression...)

groupBy ( & nbsp ;& nbsp ; Expression ... grouping ) Specify the expressions that are used to form groups over the query results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions are simply removed. Parameters

jakarta.persistence.criteria.Subquery.groupBy(List)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Subquery Subquery groupBy ( & nbsp ;& nbsp ; List grouping ) Specify the expressions that are used to form groups over the subquery results. Replaces the previous specified grouping expressions, if any. If no grouping expressions

jakarta.persistence.criteria.CriteriaQuery.groupBy(Expression...)

groupBy ( & nbsp ;& nbsp ; Expression ... grouping ) Specify the expressions that are used to form groups over the query results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions are simply removed. This method

jakarta.persistence.criteria.CriteriaQuery.groupBy(List)

groupBy ( & nbsp ;& nbsp ; List grouping ) Specify the expressions that are used to form groups over the query results. Replaces the previous specified grouping expressions, if any. If no grouping expressions are specified, any previously added grouping expressions are simply removed. This method

JPA Named Queries Annotations

. A container annotation that groups multiple @NamedQuery definitions on a single class. Supplies parameters

FROM clause (JPQL / Criteria API)

, FETCH,FROM, GROUP , HAVING, IN, INDEX, INNER, IS, JOIN, KEY, LEADING, LEFT, LENGTH, LIKE,LOCATE

JPA Query Expressions (JPQL / Criteria)

JPQL and criteria queries are built on query expressions. Every query consists of clauses , such as SELECT , FROM , WHERE , GROUP BY , HAVING , and ORDER BY . Each clause is composed of JPQL or Criteria API expressions. Atomic expressions The atomic query expressions are: JPQL / Criteria Variables

JPA Extended API Reference Guide

Jakarta Persistence API (JPA) 3.2 documentation, generated from the official JavaDoc and enriched with practical notes. It groups the API types into logical sections to help you locate core concepts, query facilities, metamodel details, configuration options, annotations, and exception information

DELETE Queries in JPA/JPQL

cannot include multiple variables, JOIN clauses, or the GROUP BY , HAVING , and ORDER BY clauses

JPA Fetch Graphs Annotations

plan. A container annotation used to group multiple @NamedEntityGraph definitions on a single entity

Comparison in JPQL and Criteria API

between any two values that belong to the same group listed above. For example, a double

UPDATE SET Queries in JPA/JPQL

. However, they do not support the GROUP BY , HAVING , and ORDER BY clauses. For example, the following

JPA Criteria API Queries

, multiselect , array , tuple , construct ) FROM clause ( from , join , fetch ) WHERE clause ( where ) GROUP

Support for roles/groups in ObjectDB

, there could be a role/ group element which would categorise the user further. This would help in authentication. & nbsp ; Thanks st.clair.clarke St Clair Clarke ... ObjectDB should incorporate roles/ group in ObjectDB config file? I see no support for this. I would like to place several users under a given group or role, but I see no way of doing this as

jakarta.persistence.PersistenceConfiguration

.ValidatorFactory , Since: Jakarta Persistence (JPA) 1.0 VALIDATION_ GROUP _PRE_PERSIST Target groups for validation at PrePersist . Since: Jakarta Persistence (JPA) 1.0 VALIDATION_ GROUP _PRE_REMOVE Target groups for validation at PreRemove . Since: Jakarta Persistence (JPA) 1.0 VALIDATION_ GROUP _PRE_UPDATE Target

Privacy Policy

For the purposes of this Privacy Policy: Account & nbsp ;means a unique account created for You to access our Service or parts of our Service. Company & nbsp ;(referred to as either "the Company ... 37 Westminster Buildings Theatre Square Nottingham NG1 6LG United Kingdom. Cookies & nbsp ;are small

Step 1: Create a Maven Web Project

Next . Enter Group Id (e.g.& nbsp ; Guestbook ), Artifact Id (e.g.& nbsp ; Guestbook ), Version (e.g ... We start by creating a new Maven-WTP dynamic web project& nbsp ;in Eclipse: Open the [New Project] dialog box, e.g. by using& nbsp ; File New Project... Select& nbsp ; Maven Maven Project and click& nbsp

jakarta.persistence.criteria.AbstractQuery.having(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery AbstractQuery having ( & nbsp ;& nbsp ; Expression restriction ) Specify a restriction over the groups of the query. Replaces the previous having restriction(s), if any. Parameters: restriction - a simple or compound

jakarta.persistence.criteria.AbstractQuery.having(Predicate...)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery AbstractQuery having ( & nbsp ;& nbsp ; Predicate... restrictions ) Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates. Replaces the previously having added

jakarta.persistence.criteria.AbstractQuery.having(List)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery AbstractQuery having ( & nbsp ;& nbsp ; List restrictions ) Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates. Replaces the previously added having

jakarta.persistence.criteria.Subquery.having(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Subquery Subquery having ( & nbsp ;& nbsp ; Expression restriction ) Specify a restriction over the groups of the subquery. Replaces the previous having restriction(s), if any. This method only overrides the return type

jakarta.persistence.criteria.Subquery.having(Predicate...)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Subquery Subquery having ( & nbsp ;& nbsp ; Predicate... restrictions ) Specify restrictions over the groups of the subquery according the conjunction of the specified restriction predicates. Replaces the previously added having

jakarta.persistence.criteria.Subquery.having(List)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Subquery Subquery having ( & nbsp ;& nbsp ; List restrictions ) Specify restrictions over the groups of the query according the conjunction of the specified restriction predicates. Replaces the previously added having restriction(s

Step 2: Entity Class and Persistence Unit

the& nbsp ;project node& nbsp ;(in the [Package Explorer] window), select& nbsp ; New Source Folder ... right clicking the new source directory node& nbsp ;(in the [Package Explorer] window) and selecting& nbsp ; New Class . Enter& nbsp ; guest as the package name - use& nbsp ; exactly that case sensitive package