Skip to content

Commit 43005e1

Browse files
authored
Merge branch 'main' into HHH-18829
2 parents c41799b + 4bf2ea6 commit 43005e1

File tree

130 files changed

+2592
-2328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+2592
-2328
lines changed

build.gradle

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ plugins {
3939

4040
apply from: file( 'gradle/module.gradle' )
4141

42+
4243
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4344
// Release Task
4445

@@ -61,19 +62,34 @@ task publish {
6162
"themselves if they have any publish-related activities to perform"
6263
}
6364

64-
ext {
65-
if ( project.hasProperty( 'hibernatePublishUsername' ) ) {
66-
if ( ! project.hasProperty( 'hibernatePublishPassword' ) ) {
67-
throw new GradleException( "Should specify both `hibernatePublishUsername` and `hibernatePublishPassword` as project properties" );
68-
}
65+
66+
67+
def ossrhUsername = extractPropertyOrSetting( "OSSRH_USER" )
68+
def ossrhPassword = extractPropertyOrSetting( "OSSRH_PASSWORD" )
69+
70+
String extractPropertyOrSetting(String name) {
71+
if ( project.hasProperty( name) ) {
72+
return project.property( name )
73+
}
74+
75+
def sysProp = System.getProperty( name )
76+
if ( sysProp != null ) {
77+
return sysProp
6978
}
79+
80+
def envProp = System.getenv( name )
81+
if ( envProp != null ) {
82+
return envProp
83+
}
84+
85+
return null
7086
}
7187

7288
nexusPublishing {
7389
repositories {
7490
sonatype {
75-
username = project.hasProperty( 'hibernatePublishUsername' ) ? project.property( 'hibernatePublishUsername' ) : null
76-
password = project.hasProperty( 'hibernatePublishPassword' ) ? project.property( 'hibernatePublishPassword' ) : null
91+
username = ossrhUsername
92+
password = ossrhPassword
7793
}
7894
}
7995
}
@@ -82,26 +98,15 @@ gradle.taskGraph.addTaskExecutionGraphListener(
8298
new TaskExecutionGraphListener() {
8399
@Override
84100
void graphPopulated(TaskExecutionGraph graph) {
85-
String[] tasksToLookFor = [
86-
'publish',
87-
'publishToSonatype',
88-
'publishAllPublicationsToSonatype',
89-
'publishPublishedArtifactsPublicationToSonatypeRepository',
90-
'publishRelocationArtifactsPublicationToSonatypeRepository',
91-
]
92-
93-
for ( String taskToLookFor : tasksToLookFor ) {
94-
if ( graph.hasTask( taskToLookFor ) ) {
95-
// trying to publish - make sure the needed credentials are available
96-
97-
if ( project.property( 'hibernatePublishUsername' ) == null ) {
98-
throw new RuntimeException( "`-PhibernatePublishUsername=...` not found" )
101+
for ( final def task in graph.allTasks ) {
102+
if ( task instanceof PublishToMavenRepository ) {
103+
if ( ossrhUsername == null ) {
104+
throw new RuntimeException( "OSSRH username not specified, but publishing was requested" )
99105
}
100-
if ( project.property( 'hibernatePublishPassword' ) == null ) {
101-
throw new RuntimeException( "`-PhibernatePublishPassword=...` not found" )
106+
if ( ossrhPassword == null ) {
107+
throw new RuntimeException( "OSSRH password not specified, but publishing was requested" )
102108
}
103-
104-
break;
109+
break
105110
}
106111
}
107112
}
@@ -139,6 +144,3 @@ idea {
139144
name = "hibernate-orm"
140145
}
141146
}
142-
143-
144-

changelog.txt

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,72 @@ Hibernate 6 Changelog
33

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

6+
Changes in 7.0.0.Beta3 (December 05, 2024)
7+
------------------------------------------------------------------------------------------------------------------------
8+
9+
https://hibernate.atlassian.net/projects/HHH/versions/32364
10+
11+
** Bug
12+
* [HHH-18912] - Fix ORM release process
13+
* [HHH-18881] - In MySQL, array of dates are not converted correctly
14+
* [HHH-18872] - ConcreteProxy type not restored from 2LC when loading a ManyToOne
15+
* [HHH-18862] - Group by error due to subselect using foreign key reference instead of primary key in HQL query
16+
* [HHH-18859] - slice operator and @ElementCollection
17+
* [HHH-18851] - ArrayContainsArgumentTypeResolver wrongly infers array type for needle argument
18+
* [HHH-18850] - createCountQuery with Hibernate 6.6.2
19+
* [HHH-18848] - JAR for org.hibernate.orm:hibernate-scan-jandex:7.0.0.Beta2 at Maven Central
20+
* [HHH-18842] - Regression: CollectionType.replace() breaks if target is PersistentCollection, but not instance of Collection (e.g. PersistentMap)
21+
* [HHH-18832] - Bytecode enhancement skipped for entities with "compute-only" @Transient properties
22+
* [HHH-18830] - extraneous SQL UPDATE statements for unowned collection with @OrderColumn
23+
* [HHH-18826] - mappedBy validation in Processor
24+
* [HHH-18765] - Error in the booleanarray_to_string auxiliary function
25+
* [HHH-18709] - CriteriaUpdate involving JSON field containing Map<String, Object> results in SemanticException
26+
* [HHH-18705] - Hibernate processor creates bad TypedReferenceQuery when @Entity have name attribute
27+
* [HHH-18692] - Hibernate attempts to close batched statements multiple times
28+
* [HHH-18629] - Inconsistent column alias generated while result class is used for placeholder
29+
* [HHH-18610] - "SQLGrammarException: Unable to find column position by name:" when using Single Table Inheritance with a strict JDBC driver such as PostgreSQL
30+
* [HHH-18583] - Joined + discriminator inheritance treat in where clause not restricting to subtype
31+
* [HHH-18274] - Problems with generics in queries; proposed partial solution
32+
* [HHH-18069] - NullPointerException when unioning partition results
33+
* [HHH-17838] - @OneToOne relationship + @Embeddable keys + FetchType.LAZY fail in most recent version
34+
* [HHH-16054] - JPA / Hibernate, duplicate pkey error when updating entity that is a subclass of a base class that uses IdClass for composite primary key
35+
* [HHH-14119] - IN clause parameter padding not working for criteria query in conjunction with LiteralHandlingMode.BIND
36+
37+
** Improvement
38+
* [HHH-18875] - Stop using `Array.newInstance` in `org.hibernate.internal.util.collections.StandardStack`
39+
* [HHH-18861] - Improve GitHub release announcement body for automated releases
40+
* [HHH-18847] - Organize the org.hibernate.query.results package
41+
* [HHH-18844] - Run preVerifyRelease task as part of h2 CI job
42+
* [HHH-18841] - Make `_identifierMapper` property added for a IdClass synthetic
43+
* [HHH-18840] - detect and report incorrect usage of @OrderColumn, @MapKeyColumn, and @MapKey
44+
* [HHH-18683] - The method Metamodel#entity(String) should throw IllegalArgumentException for non-entities
45+
* [HHH-18534] - Remove the org.hibernate.boot.models.categorize package
46+
* [HHH-17246] - Guard against Sybase being configured for truncating trailing zeros.
47+
* [HHH-16160] - XML aggregate support for more databases
48+
* [HHH-14020] - Allow Hibernate Types to have access to ServiceRegistry during initialization
49+
* [HHH-7913] - Catalog and schema replacement in <subselect> / @Subselect
50+
51+
** New Feature
52+
* [HHH-18644] - New and improved hibernate-maven-plugin
53+
54+
** Remove Feature
55+
* [HHH-18843] - remove deprecated @OrderBy annotation
56+
57+
** Sub-task
58+
* [HHH-18804] - Add XML aggregate support for HANA
59+
* [HHH-18803] - Add XML aggregate support for DB2
60+
* [HHH-18802] - Add XML aggregate support for SQL Server
61+
* [HHH-18801] - Add XML aggregate support for Sybase ASE
62+
* [HHH-18800] - Add XML aggregate support for PostgreSQL
63+
* [HHH-18799] - Add XML aggregate support for Oracle
64+
65+
** Task
66+
* [HHH-18906] - Allow specifying UnsupportedEnhancementStrategy for Hibernate testing
67+
* [HHH-18866] - Fix more failing tests on CockroachDB
68+
* [HHH-18854] - Changes for Hibernate Reactive 3.0 integration
69+
* [HHH-18678] - Use specific tasks for CI builds
70+
71+
672
Changes in 7.0.0.Beta2 (November 13, 2024)
773
------------------------------------------------------------------------------------------------------------------------
874

ci/release/Jenkinsfile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ def checkoutReleaseScripts() {
5353
}
5454
}
5555

56+
File findReleaseNotes() {
57+
}
58+
5659
// --------------------------------------------
5760
// Pipeline
5861

@@ -148,10 +151,6 @@ pipeline {
148151
env.RELEASE_VERSION = releaseVersion.toString()
149152
env.DEVELOPMENT_VERSION = developmentVersion.toString()
150153

151-
def notesFile = new File( "release_notes.md" )
152-
assert notesFile.exists
153-
env.SCRIPT_OPTIONS = " --notes=${notesFile.absolutePath}"
154-
155154
if ( params.RELEASE_DRY_RUN ) {
156155
env.SCRIPT_OPTIONS += " -d"
157156
}
@@ -217,7 +216,7 @@ pipeline {
217216
withEnv([
218217
"DISABLE_REMOTE_GRADLE_CACHE=true"
219218
]) {
220-
sh ".release/scripts/publish.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION} ${env.GIT_BRANCH}"
219+
sh ".release/scripts/publish.sh ${env.PROJECT} ${env.RELEASE_VERSION} ${env.DEVELOPMENT_VERSION} ${env.GIT_BRANCH} ${env.SCRIPT_OPTIONS}"
221220
}
222221
}
223222
}
@@ -244,7 +243,7 @@ pipeline {
244243
extensions: [],
245244
userRemoteConfigs: [[credentialsId: 'ed25519.Hibernate-CI.github.com', url: 'https://github.com/hibernate/hibernate.org.git']]
246245
)
247-
sh "../scripts/website-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
246+
sh "../scripts/website-release.sh ${env.PROJECT} ${env.RELEASE_VERSION} ${env.SCRIPT_OPTIONS} "
248247
}
249248
}
250249
}
@@ -256,8 +255,17 @@ pipeline {
256255
steps {
257256
script {
258257
checkoutReleaseScripts()
258+
259+
def notesFiles = findFiles(glob: 'release_notes.md')
260+
if ( notesFiles.length < 1 ) {
261+
throw new IllegalStateException( "Could not locate `release_notes.md`" )
262+
}
263+
if ( notesFiles.length > 1 ) {
264+
throw new IllegalStateException( "Located more than 1 `release_notes.md`" )
265+
}
266+
259267
withCredentials([string(credentialsId: 'Hibernate-CI.github.com', variable: 'GITHUB_API_TOKEN')]) {
260-
sh ".release/scripts/github-release.sh ${env.SCRIPT_OPTIONS} ${env.PROJECT} ${env.RELEASE_VERSION}"
268+
sh ".release/scripts/github-release.sh ${env.PROJECT} ${env.RELEASE_VERSION} ${env.SCRIPT_OPTIONS} --notes=${notesFiles[0].path}"
261269
}
262270
}
263271
}

documentation/documentation.gradle

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ configurations {
5252
agroal
5353
c3p0
5454
hikaricp
55-
proxool
56-
vibur
5755

5856
jcache
5957

@@ -72,8 +70,6 @@ configurations {
7270
extendsFrom agroal
7371
extendsFrom c3p0
7472
extendsFrom hikaricp
75-
extendsFrom proxool
76-
extendsFrom vibur
7773
extendsFrom jcache
7874
extendsFrom jpamodelgen
7975
}
@@ -133,9 +129,7 @@ dependencies {
133129
reportAggregation project(':hibernate-hikaricp')
134130
reportAggregation project(':hibernate-jcache')
135131
reportAggregation project(':hibernate-micrometer')
136-
reportAggregation project(':hibernate-proxool')
137132
reportAggregation project(':hibernate-spatial')
138-
reportAggregation project(':hibernate-vibur')
139133
reportAggregation project(':hibernate-ant')
140134
reportAggregation project(':hibernate-maven-plugin')
141135
reportAggregation project(':hibernate-processor')
@@ -163,12 +157,6 @@ dependencies {
163157
hikaricp project( ':hibernate-hikaricp' )
164158
javadocSources project( path: ':hibernate-hikaricp', configuration: 'javadocSources' )
165159

166-
proxool project( ':hibernate-proxool' )
167-
javadocSources project( path: ':hibernate-proxool', configuration: 'javadocSources' )
168-
169-
vibur project( ':hibernate-vibur' )
170-
javadocSources project( path: ':hibernate-vibur', configuration: 'javadocSources' )
171-
172160
jcache project( ':hibernate-jcache' )
173161
javadocSources project( path: ':hibernate-jcache', configuration: 'javadocSources' )
174162

@@ -565,12 +553,6 @@ settingsDocumentation {
565553
description = "Settings related to integrating with the C3P0 Connection pool"
566554
settingsClassName "org.hibernate.cfg.C3p0Settings"
567555
}
568-
proxool {
569-
explicitPosition = 5
570-
summary = "Proxool Connection Pool Settings"
571-
description = "Settings related to integrating with the Proxool Connection pool"
572-
settingsClassName "org.hibernate.cfg.ProxoolSettings"
573-
}
574556
transaction {
575557
explicitPosition = 6
576558
summary = "Transaction Environment Settings"

documentation/src/main/asciidoc/introduction/Tuning.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ the connection pool.
3333
=== Tuning the connection pool
3434

3535
The connection pool built in to Hibernate is suitable for testing, but isn't intended for use in production.
36-
Instead, Hibernate supports a range of different connection pools, including our favorite, Agroal.
36+
Instead, Hibernate supports several different connection pools, including our favorite, Agroal.
3737

3838
To select and configure Agroal, you'll need to set some extra configuration properties, in addition to the settings we already saw in <<basic-configuration-settings>>.
3939
Properties with the prefix `hibernate.agroal` are passed through to Agroal:
@@ -48,7 +48,7 @@ hibernate.agroal.reapTimeout PT10s
4848
----
4949

5050
As long as you set at least one property with the prefix `hibernate.agroal`, the `AgroalConnectionProvider` will be selected automatically.
51-
There are many to choose from:
51+
There are many to choose from, as enumerated by link:{doc-javadoc-url}/org/hibernate/cfg/AgroalSettings.html[`AgroalSettings`]:
5252

5353
.Settings for configuring Agroal
5454
[%breakable,cols="37,~"]
@@ -72,10 +72,13 @@ The following settings are common to all connection pools supported by Hibernate
7272
.Common settings for connection pools
7373
[%breakable,cols="37,~"]
7474
|===
75-
| `hibernate.connection.autocommit` | The default autocommit mode
76-
| `hibernate.connection.isolation` | The default transaction isolation level
75+
| link:{doc-javadoc-url}/org/hibernate/cfg/JdbcSettings.html#AUTOCOMMIT[`hibernate.connection.autocommit`] | The default autocommit mode
76+
| link:{doc-javadoc-url}/org/hibernate/cfg/JdbcSettings.html#ISOLATION[`hibernate.connection.isolation`] | The default transaction isolation level
7777
|===
7878

79+
A popular alternative to Agroal is HikariCP.
80+
Its setting are enumerated by link:{doc-javadoc-url}/org/hibernate/cfg/HikariCPSettings.html[`HikariCPSettings`].
81+
7982
.Container-managed datasources
8083
****
8184
In a container environment, you usually don't need to configure a connection pool through Hibernate.

documentation/src/main/asciidoc/querylanguage/Expressions.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@ Naturally, there are a good number of functions for working with strings.
841841
| `replace()` | Replace every occurrence of a pattern in a string | `replace(str, patt, rep)` | ✔ / ✖
842842
| `repeat()` | Concatenate a string with itself multiple times | `repeat(str, times)` | ✖ / ✖
843843
| `collate()` | Select a collation | `collate(p.name as collation)` | ✖ / ✖
844+
| `hex()` | Encode a binary value as a hexadecimal string | `hex(image.bytes)` | ✖ / ✖
844845
|===
845846

846847
Let's take a closer look at just some of these.
@@ -1174,8 +1175,8 @@ Finally, the following functions evaluate the id, version, or natural id of an e
11741175
|===
11751176
| Function | Purpose | JPA standard
11761177

1177-
| `id()` | The value of the entity `@Id` attribute. |
1178-
| `version()` | The value of the entity `@Version` attribute. |
1178+
| `id()` | The value of the entity `@Id` attribute. |
1179+
| `version()` | The value of the entity `@Version` attribute. |
11791180
| `naturalid()` | The value of the entity `@NaturalId` attribute. | ✖
11801181
| `fk()` | The value of the foreign key column mapped by a `@ManyToOne` (or logical `@OneToOne`) association.
11811182
Useful with associations annotated `@NotFound`. | ✖
@@ -1207,6 +1208,23 @@ However, we note that the following language constructs work with arrays, and ar
12071208
| `array includes subarray` | Determine if the elements of one array include all the elements of a second array
12081209
|===
12091210

1211+
[[functions-hash]]
1212+
=== Hash functions
1213+
1214+
The following functions work on most supported platforms:
1215+
1216+
[[hash-functions]]
1217+
[cols="12,~,^15"]
1218+
|===
1219+
| Function | Purpose | JPA standard
1220+
1221+
| `sha()` | The SHA256 hash of a string. | ✖
1222+
| `md5()` | The MD5 hash of a string. | ✖
1223+
|===
1224+
1225+
These functions accept a string and return `byte[]`.
1226+
The return value is compatible with the byte array produced by Java's `MessageDigest`.
1227+
12101228
[[embedding-sql]]
12111229
==== Embedding SQL expressions
12121230

documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ transitive dependencies based on the features being used or not.
5252
|hibernate-agroal| Support for https://agroal.github.io/[Agroal] connection pooling
5353
|hibernate-c3p0| Support for https://www.mchange.com/projects/c3p0/[C3P0] connection pooling
5454
|hibernate-hikaricp| Support for https://github.com/brettwooldridge/HikariCP/[HikariCP] connection pooling
55-
|hibernate-vibur| Support for https://www.vibur.org/[Vibur DBCP] connection pooling
56-
|hibernate-proxool| Support for https://proxool.sourceforge.net/[Proxool] connection pooling
5755
|hibernate-ucp| Support for https://docs.oracle.com/en/database/oracle/oracle-database/23/jjucp/intro.html[Universal Connection Pool] connection pooling
5856
|hibernate-jcache| Integration with https://jcp.org/en/jsr/detail?id=107$$[JCache], allowing any compliant implementation as a second-level cache provider
5957
|hibernate-graalvm| Experimental extension to make it easier to compile applications as a https://www.graalvm.org/[GraalVM] native image

0 commit comments

Comments
 (0)