Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HHH-17941 - Apply incremental categorization to "annotation binding" - managed-type and persistent-attribute metadata #8102

Draft
wants to merge 138 commits into
base: wip/7.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
f05aebf
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 1, 2023
e0c68ca
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 1, 2023
b92df9f
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 2, 2023
59ce63d
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 2, 2023
d30622a
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 2, 2023
ada1453
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 2, 2023
c682705
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 2, 2023
5b38025
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 2, 2023
c99c941
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 2, 2023
5242c80
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 6, 2023
a7b9150
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 6, 2023
35ff441
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 7, 2023
4cacabe
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 7, 2023
36397c2
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 7, 2023
3023793
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 7, 2023
1cf52bf
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 7, 2023
6802905
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 7, 2023
d8835b0
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 7, 2023
f0de42e
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 8, 2023
b85229b
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 8, 2023
14e19ba
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 8, 2023
8269b6f
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 14, 2023
17912ea
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 16, 2023
82d324f
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 16, 2023
baab2fe
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 17, 2023
0cc73c7
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 17, 2023
1f9926e
HHH-17377 - Migrate to JPA 3.2
sebersole Nov 18, 2023
72f7f91
HHH-17441 - Deprecate @Comment
sebersole Nov 19, 2023
1f5507d
HHH-17377 - Migrate to JPA 3.2
mbladel Nov 20, 2023
a2de231
HHH-17504 - Ongoing JPA 32 work
sebersole Dec 4, 2023
f650834
HHH-17504 - Ongoing JPA 32 work
sebersole Dec 4, 2023
21412d5
HHH-17504 - Ongoing JPA 32 work
sebersole Dec 5, 2023
baca170
HHH-17504 - Ongoing JPA 32 work
sebersole Dec 5, 2023
e831ac2
HHH-17504 - Ongoing JPA 32 work
sebersole Dec 5, 2023
1ee10fe
HHH-17504 - Ongoing JPA 32 work
sebersole Dec 6, 2023
aee540a
HHH-17504 - Ongoing JPA 32 work
sebersole Dec 7, 2023
9903b3b
HHH-17504 - Ongoing JPA 32 work
sebersole Jan 3, 2024
97ad8b9
HHH-17504 - Ongoing JPA 32 work
sebersole Mar 6, 2024
8be21f3
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 7, 2024
14502f9
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 8, 2024
7f8a259
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 8, 2024
689c978
HHH-17504 - Ongoing JPA 32 work
sebersole Mar 12, 2024
3b702cc
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 11, 2024
70fd38b
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 12, 2024
84a44a2
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 12, 2024
7772fc8
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 12, 2024
1dd73db
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 12, 2024
ba81338
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 12, 2024
715f852
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 13, 2024
5c23315
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 13, 2024
77f3829
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 13, 2024
150d090
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 13, 2024
b47de05
Upgrade hibernate-models to 0.6.11
dreab8 Mar 13, 2024
5941f76
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 13, 2024
447a481
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 13, 2024
5f6caf6
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 13, 2024
dc0897f
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 13, 2024
16a8d93
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 13, 2024
9a82c35
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 15, 2024
6430182
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 15, 2024
25cb7b6
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models,…
dreab8 Mar 14, 2024
890708c
HHH-17460 - Ongoing JPA 32 work
mbladel Mar 12, 2024
02bfb6b
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 18, 2024
0df07e0
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 18, 2024
8e76d5f
HHH-17504 Fixed IllegalArgumentException caused by setting Annotatio…
dreab8 Mar 19, 2024
2c7bba7
rename hibernate-jpamodelgen to hibernate-processor
gavinking Mar 19, 2024
1b1f81d
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 19, 2024
581c76d
HHH-17504 - Ongoing JPA 32 work HHH-17350 - Work on hibernate-models…
dreab8 Mar 19, 2024
5a7766a
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 19, 2024
eec7676
HHH-17460 - Ongoing JPA 32 work
mbladel Mar 19, 2024
26b90d5
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 19, 2024
545a694
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 20, 2024
413342b
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 21, 2024
ed4bd7f
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 21, 2024
77d5598
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 21, 2024
c2d74c2
HHH-17460 - Ongoing JPA 32 work
dreab8 Mar 21, 2024
a129883
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 21, 2024
d158245
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 21, 2024
f3df905
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 21, 2024
3c8c888
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 21, 2024
35d9307
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 25, 2024
27c23c3
HHH-17460 - Ongoing JPA 32 work
dreab8 Mar 23, 2024
e047ce7
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 25, 2024
742a275
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 25, 2024
9945676
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 25, 2024
f991670
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
441909f
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
3a203f6
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
0a95dbd
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
0ac411f
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
452ae10
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
8a6947f
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
ada85d5
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
f87327b
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
342c3dd
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 26, 2024
4d6942c
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 27, 2024
473c0b1
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 27, 2024
91ca647
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 28, 2024
efddf62
HHH-17460 - Ongoing JPA 32 work
dreab8 Mar 28, 2024
d61797b
HHH-17460 - Ongoing JPA 32 work
dreab8 Mar 28, 2024
f4627af
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 28, 2024
35b71fe
HHH-17460 - Ongoing JPA 32 work
dreab8 Mar 29, 2024
b6035c0
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 29, 2024
3a5a442
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 29, 2024
1a1ada0
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 29, 2024
79d605b
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 29, 2024
2d4f5fe
HHH-17460 - Ongoing JPA 32 work
sebersole Mar 29, 2024
e3f50bc
HHH-17460 - Ongoing JPA 32 work
dreab8 Apr 2, 2024
73c0aaf
HHH-17460 - Ongoing JPA 32 work
marko-bekhta Apr 3, 2024
8f19041
HHH-17460 - Ongoing JPA 32 work
sebersole Apr 4, 2024
cd768c5
HHH-17460 - Ongoing JPA 32 work
sebersole Apr 4, 2024
f829bc5
HHH-17460 - Ongoing JPA 32 work
sebersole Apr 4, 2024
9f9dfae
HHH-17460 - Ongoing JPA 32 work
sebersole Apr 4, 2024
fddc68f
HHH-17460 - Ongoing JPA 32 work
sebersole Apr 4, 2024
d9ac941
HHH-17460 - Ongoing JPA 32 work
sebersole Apr 4, 2024
fff5acb
HHH-17504 - Ongoing JPA 3.2 work
sebersole Apr 12, 2024
08b9d92
HHH-17961 - Drop support for hibernate.mapping.precedence
sebersole Apr 15, 2024
48e72f6
Fix rebase compilation errors
dreab8 Apr 16, 2024
f34b8ca
HHH-17460 - Ongoing JPA 32 work
dreab8 Apr 2, 2024
9f57b25
HHH-17460 - Ongoing JPA 32 work
dreab8 Apr 16, 2024
1036d90
Pre-steps for release : `7.0.0.Alpha1`
Hibernate-CI Apr 16, 2024
ae36f9d
Post-steps for release : `7.0.0.Alpha1`
Hibernate-CI Apr 16, 2024
a3e4af4
HHH-17504 - Ongoing JPA 3.2 work
sebersole Apr 16, 2024
e4869c8
Switch to JDK 17 for Jenkins build
beikov Apr 17, 2024
82a3364
txn timeout migration note
sebersole Apr 18, 2024
6c37e85
Disable Kotlin tests on s390x until gradle#27273 is fixed
beikov Apr 19, 2024
b50c679
Switch to JDK 17 on the nightly Jenkins job
beikov Apr 19, 2024
9d2b1a4
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 3, 2024
d1152ee
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 10, 2024
afbdf75
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 11, 2024
cb017e9
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 16, 2024
9741853
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 18, 2024
c6f2969
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 19, 2024
0168f75
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 19, 2024
4243e27
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 19, 2024
827b194
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 19, 2024
3ff8db9
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 19, 2024
d82ad04
HHH-17941 - Apply incremental categorization to "annotation binding" …
sebersole Apr 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/atlas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
build:
permissions:
contents: read
name: Java 11
name: ORM
# runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64, OCI]
strategy:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
RDBMS: ${{ matrix.rdbms }}
RUNID: ${{ github.run_number }}
run: ci/database-start.sh
- name: Set up Java 11
- name: Set up Java 17
uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm'
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ jobs:
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/contributor-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
push:
branches:
- 'main'
- 'wip/7.0'
# WARNING: Using pull_request_target to access secrets, but we check out the PR head commit.
# See checkout action for details.
pull_request_target:
branches:
- 'main'
- 'wip/7.0'


permissions: {} # none

Expand All @@ -31,7 +34,7 @@ jobs:
build:
permissions:
contents: read
name: Java 11
name: Java 17
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -77,11 +80,11 @@ jobs:
env:
RDBMS: ${{ matrix.rdbms }}
run: ci/database-start.sh
- name: Set up Java 11
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- name: Get year/month for cache key
id: get-date
run: echo "yearmonth=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT
Expand Down
5 changes: 2 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper
@Library('hibernate-jenkins-pipeline-helpers@1.9') _
import org.hibernate.jenkins.pipeline.helpers.job.JobHelper

@Field final String DEFAULT_JDK_VERSION = '11'
@Field final String DEFAULT_JDK_VERSION = '17'
@Field final String DEFAULT_JDK_TOOL = "OpenJDK ${DEFAULT_JDK_VERSION} Latest"
@Field final String NODE_PATTERN_BASE = 'Worker&&Containers'
@Field List<BuildEnvironment> environments
Expand All @@ -41,10 +41,9 @@ stage('Configure') {
// new BuildEnvironment( dbName: 'sybase' ),
// Don't build with HANA by default, but only do it nightly until we receive a 3rd instance
// new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ),
new BuildEnvironment( node: 's390x' ),
new BuildEnvironment( node: 's390x', additionalOptions: '-PexcludeTests=**/KotlinProjectTests*' ),
new BuildEnvironment( dbName: 'tidb', node: 'tidb',
notificationRecipients: 'tidb_hibernate@pingcap.com' ),
new BuildEnvironment( testJdkVersion: '17' ),
// We want to enable preview features when testing newer builds of OpenJDK:
// even if we don't use these features, just enabling them can cause side effects
// and it's useful to test that.
Expand Down
22 changes: 22 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@ Hibernate 6 Changelog

Note: Please refer to JIRA to learn more about each issue.

Changes in 7.0.0.Alpha1 (April 16, 2024)
------------------------------------------------------------------------------------------------------------------------

https://hibernate.atlassian.net/projects/HHH/versions/32214

** Deprecation
* [HHH-17441] - Deprecate @Comment

** New Feature
* [HHH-17460] - Ongoing JPA 3.2 work
* [HHH-17459] - Allow resolution callbacks on select o.h.mapping objects

** Remove Feature
* [HHH-17961] - Drop support for hibernate.mapping.precedence
* [HHH-17894] - Remove AdditionalJaxbMappingProducer
* [HHH-17893] - Remove MetadataContributor
* [HHH-17892] - Remove @Persister

** Task
* [HHH-17444] - Ongoing JPA 32 work


Changes in 6.4.1.Final (December 15, 2023)
------------------------------------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion ci/snapshot-publish.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pipeline {
label 'Fedora'
}
tools {
jdk 'OpenJDK 11 Latest'
jdk 'OpenJDK 17 Latest'
}
options {
rateLimitBuilds(throttle: [count: 1, durationName: 'hour', userBoost: true])
Expand Down
6 changes: 3 additions & 3 deletions documentation/documentation.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ dependencies {
reportAggregation project(':hibernate-vibur')
reportAggregation project(':hibernate-ant')
reportAggregation project(':hibernate-enhance-maven-plugin')
reportAggregation project(':hibernate-jpamodelgen')
reportAggregation project(':hibernate-processor')

asciidoctorGems 'rubygems:rouge:4.1.1'

Expand Down Expand Up @@ -162,8 +162,8 @@ dependencies {
jcache project( ':hibernate-jcache' )
javadocSources project( path: ':hibernate-jcache', configuration: 'javadocSources' )

jpamodelgen project( ':hibernate-jpamodelgen' )
javadocSources project( path: ':hibernate-jpamodelgen', configuration: 'javadocSources' )
jpamodelgen project( ':hibernate-processor' )
javadocSources project( path: ':hibernate-processor', configuration: 'javadocSources' )

javadocClasspath libs.loggingAnnotations
javadocClasspath jakartaLibs.validation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ or `org.slf4j:slf4j-jdk14`
| A JDBC connection pool, for example, {agroal}[Agroal] |
`org.hibernate.orm:hibernate-agroal` +
and `io.agroal:agroal-pool`
| The {generator}[Hibernate Metamodel Generator], especially if you're using the JPA criteria query API | `org.hibernate.orm:hibernate-jpamodelgen`
| The {generator}[Hibernate Metamodel Generator], especially if you're using the JPA criteria query API | `org.hibernate.orm:hibernate-processor`
| The {query-validator}[Query Validator], for compile-time checking of HQL | `org.hibernate:query-validator`
| {validator}[Hibernate Validator], an implementation of {bean-validation}[Bean Validation] |
`org.hibernate.validator:hibernate-validator` +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ dependencies {
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'

// JPA Metamodel Generator
annotationProcessor 'org.hibernate.orm:hibernate-jpamodelgen:{fullVersion}'
annotationProcessor 'org.hibernate.orm:hibernate-processor:{fullVersion}'

// Compile-time checking for HQL
//implementation 'org.hibernate:query-validator:2.0-SNAPSHOT'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ transitive dependencies based on the features being used or not.
|hibernate-core| The core object/relational mapping engine
|hibernate-envers| Entity versioning and auditing
|hibernate-spatial| Support for spatial/GIS data types using https://github.com/GeoLatte/geolatte-geom[GeoLatte]
|hibernate-jpamodelgen| An annotation processor that generates a JPA-compliant metamodel, plus optional Hibernate extras
|hibernate-processor| An annotation processor that generates a JPA-compliant metamodel, plus optional Hibernate extras
|===

[cols="40m,~"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,35 +491,4 @@ include::{extrasdir}/entity/entity-proxy-persist-mapping.sql[]
====

As you can see in the associated SQL snippet, Hibernate issues no SQL SELECT query since the proxy can be
constructed without needing to fetch the actual entity POJO.

[[entity-persister]]
==== Define a custom entity persister

The https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/annotations/Persister.html[`@Persister`] annotation is used to specify a custom entity or collection persister.

For entities, the custom persister must implement the https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/persister/entity/EntityPersister.html[`EntityPersister`] interface.

For collections, the custom persister must implement the https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/persister/collection/CollectionPersister.html[`CollectionPersister`] interface.

NOTE: Supplying a custom persister has been allowed historically, but has never been fully supported.
Hibernate 6 provides better, alternative ways to accomplish the use cases for a custom persister. As
of 6.2 `@Persister` has been formally deprecated.


[[entity-persister-mapping]]
.Entity persister mapping
====
[source,java]
----
include::{example-dir-persister}/Author.java[tag=entity-persister-mapping,indent=0]
----

[source,java]
----
include::{example-dir-persister}/Book.java[tag=entity-persister-mapping,indent=0]
----
====

By providing your own `EntityPersister` and `CollectionPersister` implementations,
you can control how entities and collections are persisted into the database.
constructed without needing to fetch the actual entity POJO.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<annotationProcessorPaths>
<path>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<artifactId>hibernate-processor</artifactId>
<version>$currentHibernateVersion</version>
<!-- Optionally exclude transitive dependencies -->
<exclusions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ It also exposes the following method forms:
==== Static Metamodel Generation

Static metamodel generation can be incorporated into Gradle builds via the
annotation processor provided by the `org.hibernate.orm:hibernate-jpamodelgen` artifact. Applying
annotation processor provided by the `org.hibernate.orm:hibernate-processor` artifact. Applying
an annotation processor in Gradle is super easy -


[source,gradle]
----
dependencies {
annotationProcessor "org.hibernate.orm:hibernate-jpamodelgen:${hibernateVersion}"
annotationProcessor "org.hibernate.orm:hibernate-processor:${hibernateVersion}"
}
----
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Jakarta Persistence defines a typesafe Criteria API which allows <<criteria,`Criteria`>>
queries to be constructed in a strongly-typed manner, utilizing so-called static metamodel
classes. The Hibernate Static Metamodel Generator, available via the published
`org.hibernate.orm:hibernate-jpamodelgen` artifact, is an link:{ann-proc}[annotation processor]
`org.hibernate.orm:hibernate-processor` artifact, is an link:{ann-proc}[annotation processor]
used to generate these static metamodel classes.

[NOTE]
Expand Down
2 changes: 1 addition & 1 deletion gradle/version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
hibernateVersion=6.6.0-SNAPSHOT
hibernateVersion=7.0.0-SNAPSHOT
15 changes: 8 additions & 7 deletions hibernate-core/hibernate-core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ plugins {
id 'org.hibernate.build.xjc-jakarta'
}

repositories {
gradlePluginPortal()
}

description = 'Hibernate\'s core ORM functionality'

apply from: rootProject.file( 'gradle/published-java-module.gradle' )
Expand All @@ -31,7 +27,7 @@ dependencies {
api jakartaLibs.jpa
api jakartaLibs.jta

implementation libs.hcann
implementation libs.hibernateModels
implementation libs.jandex
implementation libs.classmate
implementation libs.byteBuddy
Expand Down Expand Up @@ -75,7 +71,7 @@ dependencies {
testRuntimeOnly libs.jacksonXml
testRuntimeOnly libs.jacksonJsr310

testAnnotationProcessor project( ':hibernate-jpamodelgen' )
testAnnotationProcessor project( ':hibernate-processor' )

// NOTE: it seems like, since 4.10, the Antlr Tool no longer defines
// transitive dep on the corresponding Antlr Runtime. At least, I get
Expand Down Expand Up @@ -130,8 +126,13 @@ xjc {
xjcBindingFile = file( 'src/main/xjb/hbm-mapping-bindings.xjb' )
xjcExtensions += ['inheritance', 'simplify']
}
configuration {
xsdFile = file( 'src/main/resources/org/hibernate/xsd/cfg/configuration-3.2.0.xsd' )
xjcBindingFile = file( 'src/main/xjb/configuration-bindings.xjb' )
xjcExtensions += ['inheritance', 'simplify']
}
mapping {
xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-3.1.0.xsd' )
xsdFile = file( 'src/main/resources/org/hibernate/xsd/mapping/mapping-7.0.xsd' )
xjcBindingFile = file( 'src/main/xjb/mapping-bindings.xjb' )
xjcExtensions += ['inheritance', 'simplify']
}
Expand Down
38 changes: 34 additions & 4 deletions hibernate-core/src/main/java/org/hibernate/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@
import java.util.List;
import java.util.function.Consumer;

import jakarta.persistence.CacheRetrieveMode;
import jakarta.persistence.CacheStoreMode;
import jakarta.persistence.LockModeType;
import jakarta.persistence.PessimisticLockScope;
import org.hibernate.graph.RootGraph;
import org.hibernate.jdbc.Work;
import org.hibernate.query.Query;
import org.hibernate.stat.SessionStatistics;

import jakarta.persistence.CacheRetrieveMode;
import jakarta.persistence.CacheStoreMode;
import jakarta.persistence.ConnectionConsumer;
import jakarta.persistence.ConnectionFunction;
import jakarta.persistence.EntityGraph;
import jakarta.persistence.EntityManager;
import jakarta.persistence.FlushModeType;
import jakarta.persistence.LockModeType;
import jakarta.persistence.PessimisticLockScope;
import jakarta.persistence.criteria.CriteriaDelete;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.CriteriaUpdate;
Expand Down Expand Up @@ -1585,4 +1587,32 @@ default LockRequest setLockScope(PessimisticLockScope scope) {
*/
@Override @Deprecated(since = "6.0") @SuppressWarnings("rawtypes")
Query createQuery(CriteriaUpdate updateQuery);


@Override
default <C> void runWithConnection(ConnectionConsumer<C> action) {
doWork( connection -> {
try {
//noinspection unchecked
action.accept( (C) connection );
}
catch (Exception e) {
throw new RuntimeException( e );
}
} );
}

@Override
default <C, T> T callWithConnection(ConnectionFunction<C, T> function) {
return doReturningWork( (connection) -> {
try {
//noinspection unchecked
return function.apply( (C) connection );
}
catch (Exception e) {
throw new RuntimeException( e );
}
} );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import jakarta.persistence.Table;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
Expand Down Expand Up @@ -49,13 +51,14 @@
* @author Yanming Zhou
* @author Gavin King
*
* @remove JPA 3.2 adds a comment attribute to {@linkplain jakarta.persistence.Table}
* @deprecated Prefer {@linkplain Table#comment()}
*/
@TypeBinderType(binder = CommentBinder.class)
@AttributeBinderType(binder = CommentBinder.class)
@Target({METHOD, FIELD, TYPE})
@Retention(RUNTIME)
@Repeatable(Comments.class)
@Deprecated
@Remove
public @interface Comment {
/**
Expand Down