From b93abecc631178f4049e32b9eeb96f1eae67465c Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Wed, 28 Feb 2024 05:41:15 +0100 Subject: [PATCH 1/9] update gh action build Signed-off-by: Lukas Jungmann --- .github/workflows/maven.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 87c334b2..dd0bc041 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License v. 2.0 which is available at @@ -27,9 +27,9 @@ jobs: steps: - name: Checkout for build - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: ${{ matrix.java_version }} From 3431dbc0732c5dcba90105a94bee22e42c2ce90c Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Wed, 28 Feb 2024 05:41:30 +0100 Subject: [PATCH 2/9] Update cprights Signed-off-by: Lukas Jungmann --- api/src/main/java/jakarta/persistence/Column.java | 2 +- api/src/main/java/jakarta/persistence/EntityTransaction.java | 2 +- api/src/main/java/jakarta/persistence/MapKeyColumn.java | 2 +- api/src/main/java/jakarta/persistence/MapsId.java | 2 +- api/src/main/java/jakarta/persistence/Query.java | 2 +- api/src/main/java/jakarta/persistence/StoredProcedureQuery.java | 2 +- api/src/main/java/jakarta/persistence/TypedQuery.java | 2 +- .../main/java/jakarta/persistence/spi/PersistenceUnitInfo.java | 2 +- api/src/main/resources/jakarta/persistence/orm_3_2.xsd | 2 +- api/src/main/resources/jakarta/persistence/persistence_3_2.xsd | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/src/main/java/jakarta/persistence/Column.java b/api/src/main/java/jakarta/persistence/Column.java index c850d02c..de8f2b25 100644 --- a/api/src/main/java/jakarta/persistence/Column.java +++ b/api/src/main/java/jakarta/persistence/Column.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/api/src/main/java/jakarta/persistence/EntityTransaction.java b/api/src/main/java/jakarta/persistence/EntityTransaction.java index 6bc8b2c2..b84cea31 100644 --- a/api/src/main/java/jakarta/persistence/EntityTransaction.java +++ b/api/src/main/java/jakarta/persistence/EntityTransaction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/api/src/main/java/jakarta/persistence/MapKeyColumn.java b/api/src/main/java/jakarta/persistence/MapKeyColumn.java index 078d8005..11bb2733 100644 --- a/api/src/main/java/jakarta/persistence/MapKeyColumn.java +++ b/api/src/main/java/jakarta/persistence/MapKeyColumn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/api/src/main/java/jakarta/persistence/MapsId.java b/api/src/main/java/jakarta/persistence/MapsId.java index 50eaf585..b81bdda1 100644 --- a/api/src/main/java/jakarta/persistence/MapsId.java +++ b/api/src/main/java/jakarta/persistence/MapsId.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/api/src/main/java/jakarta/persistence/Query.java b/api/src/main/java/jakarta/persistence/Query.java index 92fe32fa..8ace7b0e 100644 --- a/api/src/main/java/jakarta/persistence/Query.java +++ b/api/src/main/java/jakarta/persistence/Query.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/api/src/main/java/jakarta/persistence/StoredProcedureQuery.java b/api/src/main/java/jakarta/persistence/StoredProcedureQuery.java index 3b81c1d7..6b1a4778 100644 --- a/api/src/main/java/jakarta/persistence/StoredProcedureQuery.java +++ b/api/src/main/java/jakarta/persistence/StoredProcedureQuery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/api/src/main/java/jakarta/persistence/TypedQuery.java b/api/src/main/java/jakarta/persistence/TypedQuery.java index ece88f5d..493b63ab 100644 --- a/api/src/main/java/jakarta/persistence/TypedQuery.java +++ b/api/src/main/java/jakarta/persistence/TypedQuery.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/api/src/main/java/jakarta/persistence/spi/PersistenceUnitInfo.java b/api/src/main/java/jakarta/persistence/spi/PersistenceUnitInfo.java index b479fc4e..f6cbb4aa 100644 --- a/api/src/main/java/jakarta/persistence/spi/PersistenceUnitInfo.java +++ b/api/src/main/java/jakarta/persistence/spi/PersistenceUnitInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/api/src/main/resources/jakarta/persistence/orm_3_2.xsd b/api/src/main/resources/jakarta/persistence/orm_3_2.xsd index e61480a4..cf1e60fb 100644 --- a/api/src/main/resources/jakarta/persistence/orm_3_2.xsd +++ b/api/src/main/resources/jakarta/persistence/orm_3_2.xsd @@ -1,6 +1,6 @@ + + + + + Qualifier annotation class used for dependency injection. + + + + + + + + + + + + Scope annotation class used for dependency injection. + + + + + + + @@ -1014,6 +1040,20 @@ This section provides the XML schema for the `persistence.xml` file. + + + + An extension point for integration related configuration, e.g. cdi: + + + + @@ -1046,7 +1086,7 @@ This section provides the XML schema for the `persistence.xml` file. + fixed="3.2" use="required"/> @@ -1103,4 +1143,5 @@ This section provides the XML schema for the `persistence.xml` file. + ---- \ No newline at end of file diff --git a/spec/src/main/asciidoc/ch09-container-provider-contracts.adoc b/spec/src/main/asciidoc/ch09-container-provider-contracts.adoc index bea3be1f..f32b1664 100644 --- a/spec/src/main/asciidoc/ch09-container-provider-contracts.adoc +++ b/spec/src/main/asciidoc/ch09-container-provider-contracts.adoc @@ -1,5 +1,5 @@ // -// Copyright (c) 2017, 2021 Contributors to the Eclipse Foundation +// Copyright (c) 2017, 2024 Contributors to the Eclipse Foundation // == Container and Provider Contracts for Deployment and Bootstrapping @@ -20,7 +20,7 @@ discovering the `persistence.xml` files and processing them. When the container finds a `persistence.xml` file, it must process the persistence unit definitions that it contains. The container must validate the `persistence.xml` file against the -`persistence_3_0.xsd` or `persistence_2_2.xsd` schema in accordance with +`persistence_3_2.xsd`, `persistence_3_0.xsd` or `persistence_2_2.xsd` schema in accordance with the version specified by the `persistence.xml` file and report any validation errors. Provider or data source information not specified in the `persistence.xml` file must be provided at deployment time or defaulted by the container. The diff --git a/spec/src/main/asciidoc/ch12-xml-or-mapping-descriptor.adoc b/spec/src/main/asciidoc/ch12-xml-or-mapping-descriptor.adoc index 7a7c3b1c..d1f48da0 100644 --- a/spec/src/main/asciidoc/ch12-xml-or-mapping-descriptor.adoc +++ b/spec/src/main/asciidoc/ch12-xml-or-mapping-descriptor.adoc @@ -1,5 +1,5 @@ // -// Copyright (c) 2017, 2023 Contributors to the Eclipse Foundation +// Copyright (c) 2017, 2024 Contributors to the Eclipse Foundation // == XML Object/Relational Mapping Descriptor [[a16944]] @@ -1497,6 +1497,7 @@ object/relational mapping schema for use with the Persistence API. int length() default 255; int precision() default 0; // decimal precision int scale() default 0; // decimal scale + int secondPrecision() default -1; //fractional second precision CheckConstraint[] check() default {}; String comment() default ""; } @@ -1519,6 +1520,7 @@ object/relational mapping schema for use with the Persistence API. + @@ -3404,5 +3406,4 @@ object/relational mapping schema for use with the Persistence API. - ---- \ No newline at end of file From 17720d7a3d513b7bb091fd9bcbdb141369f31edf Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Wed, 28 Feb 2024 15:57:34 +0100 Subject: [PATCH 4/9] update changelog Signed-off-by: Lukas Jungmann --- spec/src/main/asciidoc/appendixes.adoc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/spec/src/main/asciidoc/appendixes.adoc b/spec/src/main/asciidoc/appendixes.adoc index 41f23660..1b909f33 100644 --- a/spec/src/main/asciidoc/appendixes.adoc +++ b/spec/src/main/asciidoc/appendixes.adoc @@ -1,5 +1,5 @@ // -// Copyright (c) 2017, 2023 Contributors to the Eclipse Foundation +// Copyright (c) 2017, 2024 Contributors to the Eclipse Foundation // [appendix] @@ -77,7 +77,13 @@ Added options member to elements which result in DDL generation Added `EnumeratedValue` allowing custom mapping of fields of Java enums -Added `comment` and `check` members to table and column annotations, along with `CheckConstraint` +Added `comment` and `check` members to Table and Column annotations, along with `CheckConstraint` + +Added `secondPrecision` to Column annotation and clarified semantics of Column members + +Added factory-level access to named queries and named entity graphs + +Added integration points for dependency injection Made the `name` member of `TableGenerator` and `SequenceGenerator` optional and allow usage of these annotations at the java package level @@ -86,7 +92,7 @@ Clarified the primary key types supported for each `GenerationType` Clarified availability of `SEQUENCE`, `TABLE` and `UUID` generated IDs on `PrePersist` -Clarified semantics of numeric literals and added support for `bi` and `bd` suffixes +Clarified semantics of numeric literals, numeric type promotions and added support for `bi` and `bd` suffixes Clarified semantics of `Convert`/`Converter` annotations @@ -94,13 +100,15 @@ Clarified rules around distinction of entity names and identification variables Clarified the semantics of `Bindable.ENTITY_TYPE` in javadoc +Clarified the semantics of collection-valued query parameters + Entity and embeddable classes may now be static inner classes Primary key classes are no longer required to be public and serializable Pulled `getParameters()` up from `CriteriaQuery` to `CommonAbstractCriteria` -Updated object/relational mapping schema +Updated persistence and object/relational mapping schemas Fixed wildcard types in `addSubgraph` and `addAttributeNode` in `Graph` From 7489483c4a659ba3d5a3938294bc3bb69a447484 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Wed, 28 Feb 2024 16:06:51 +0100 Subject: [PATCH 5/9] update build plugins Signed-off-by: Lukas Jungmann --- api/pom.xml | 15 ++++++++------- spec/pom.xml | 12 ++++++------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 3868056f..f38364ba 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -1,7 +1,7 @@ @@ -60,7 +60,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.3.0 + 3.4.1 enforce-versions @@ -70,8 +70,8 @@ - [11,) - You need Java SE 11 or newer + [17,) + The build requires Java SE 17 or newer From 528e6ed8f5f223928879381fd0604c24956ee508 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Wed, 28 Feb 2024 16:32:55 +0100 Subject: [PATCH 6/9] Update spec/src/main/asciidoc/appendixes.adoc Co-authored-by: Gavin King --- spec/src/main/asciidoc/appendixes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/src/main/asciidoc/appendixes.adoc b/spec/src/main/asciidoc/appendixes.adoc index 1b909f33..5c043218 100644 --- a/spec/src/main/asciidoc/appendixes.adoc +++ b/spec/src/main/asciidoc/appendixes.adoc @@ -77,7 +77,7 @@ Added options member to elements which result in DDL generation Added `EnumeratedValue` allowing custom mapping of fields of Java enums -Added `comment` and `check` members to Table and Column annotations, along with `CheckConstraint` +Added `comment` and `check` members to `@Table` and `@Column` annotations, along with `@CheckConstraint` Added `secondPrecision` to Column annotation and clarified semantics of Column members From d0a12042586764a998ecdf5e69408f37ccf04bc5 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Wed, 28 Feb 2024 16:33:00 +0100 Subject: [PATCH 7/9] Update spec/src/main/asciidoc/appendixes.adoc Co-authored-by: Gavin King --- spec/src/main/asciidoc/appendixes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/src/main/asciidoc/appendixes.adoc b/spec/src/main/asciidoc/appendixes.adoc index 5c043218..6b768655 100644 --- a/spec/src/main/asciidoc/appendixes.adoc +++ b/spec/src/main/asciidoc/appendixes.adoc @@ -79,7 +79,7 @@ Added `EnumeratedValue` allowing custom mapping of fields of Java enums Added `comment` and `check` members to `@Table` and `@Column` annotations, along with `@CheckConstraint` -Added `secondPrecision` to Column annotation and clarified semantics of Column members +Added `secondPrecision` to `@Column` annotation and clarified semantics of `@Column` members Added factory-level access to named queries and named entity graphs From 7fad2fb31c7dd2b005aef72a4f940124f26cbd27 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Wed, 28 Feb 2024 16:33:06 +0100 Subject: [PATCH 8/9] Update spec/src/main/asciidoc/appendixes.adoc Co-authored-by: Gavin King --- spec/src/main/asciidoc/appendixes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/src/main/asciidoc/appendixes.adoc b/spec/src/main/asciidoc/appendixes.adoc index 6b768655..feec9a17 100644 --- a/spec/src/main/asciidoc/appendixes.adoc +++ b/spec/src/main/asciidoc/appendixes.adoc @@ -92,7 +92,7 @@ Clarified the primary key types supported for each `GenerationType` Clarified availability of `SEQUENCE`, `TABLE` and `UUID` generated IDs on `PrePersist` -Clarified semantics of numeric literals, numeric type promotions and added support for `bi` and `bd` suffixes +Clarified semantics of numeric literals and numeric type promotions, and added support for `bi` and `bd` suffixes Clarified semantics of `Convert`/`Converter` annotations From eaed53a6753339b3d368c9d819790544c2ab3302 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Wed, 28 Feb 2024 16:34:08 +0100 Subject: [PATCH 9/9] add a note about timeout to the changelog Signed-off-by: Lukas Jungmann --- spec/src/main/asciidoc/appendixes.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/src/main/asciidoc/appendixes.adoc b/spec/src/main/asciidoc/appendixes.adoc index feec9a17..cf4ab611 100644 --- a/spec/src/main/asciidoc/appendixes.adoc +++ b/spec/src/main/asciidoc/appendixes.adoc @@ -67,6 +67,8 @@ Added `runInTransaction()` and `callInTransaction()` to `EntityManagerFactory` Added `getName()` to `EntityManagerFactory` +Added `setTimeout(Integer)` and `getTimeout()` to `EntityTransaction` + Added programmatic API to obtain `EntityManagerFactory` using `PersistenceConfiguration` Added constants for properties defined by the specification to the `PersistenceConfiguration`