9606 Commits

Author SHA1 Message Date
Gail Badner
b419a0031b HHH-12436 - Attempted to assign id from null one-to-one property
(cherry picked from commit 3218f6cc7df4f704eef5d70cc3514856e7d6f56d)
2021-07-15 15:26:08 -07:00
Gail Badner
f0117e8874 HHH-12436 : Added test cases
(cherry picked from commit 925c7370960780bd7ba57b5e5c65dd84c14e746a)
2021-07-15 15:26:08 -07:00
Jan-Willem Gmelig Meyling
7e73de1cc9 HHH-12842 : Remove invalid workaround from ea77c1f for isNullable regression from 2bfe300
(cherry picked from commit 8535adc05736e9ae93d818d9aff25bf9255a1bbd)
2021-07-15 15:26:08 -07:00
Jan-Willem Gmelig Meyling
b53ce90255 HHH-12842 - Test that shows @OneToOne will be lazily loaded again
(cherry picked from commit bf6f105c41b08cba73e608abaeccd2a54bab4220)
2021-07-15 15:26:08 -07:00
Jan-Willem Gmelig Meyling
f21e8c64c3 HHH-12842 - Pass OneToOne constrained to determine nullability of type
(cherry picked from commit 662f6b2b533e6f3651a7d475859927f2d495e1e8)
2021-07-15 15:26:08 -07:00
Chris Cranford
d6bc53235a HHH-12320 HHH-12975 - Make sure foreign key name/mode is set prior to building the constraint.
(cherry picked from commit 41e49725ae8e2dcb1c92c8d94b0fc404a0031b63)
2021-07-15 15:26:08 -07:00
Chris Cranford
92f41e41f6 HHH-12320 HHH-12975 - Added test cases.
(cherry picked from commit 9022085f5c48467089e74f4354ee6716d1616e99)
2021-07-15 15:26:08 -07:00
Ranabir Chakraborty
859ac47263 HHH-14697 TimePropertyTest fails on MySQL 8.0 with a ComparisonFailure 2021-07-09 10:15:17 -07:00
Andrea Boriero
2c7cbf04e0 HHH-14616 Change VERSION_COLUMN_ALIAS from v to version_
(cherry picked from commit dae2c73f83ebbca3acdf43e37a7c35158c5b2107)
2021-06-04 11:17:02 -07:00
Gail Badner
3ce531f1d6 HHH-14616 : Add test case with default hibernate.globally_quoted_identifiers (=false) and version column quoted
(cherry picked from commit 23055fb6ce26964e9f52eea72832c062fd351750)
2021-06-04 11:17:02 -07:00
Andrea Boriero
2f0504853a HHH-14616 Oprimistic Lock throws org.hibernate.exception.SQLGrammarException: could not retrieve version
(cherry picked from commit 1b50cfaea15152838ced9902d36ff8da5cd36c52)
2021-06-04 11:17:02 -07:00
Andrea Boriero
755f4ef6b6 HHH-14616 Add test for issue
(cherry picked from commit 2a571aeb40a2a5b4fda4adf4bdb6c96a0e92af68)
2021-06-04 11:17:02 -07:00
Yoann Rodière
86d883e998 HHH-13682 Enable extended bytecode enhancement in NaturalIdInUninitializedAssociationTest
This test accesses a field of an entity directly and expects it to be
automatically initialized; this cannot work without extended bytecode
enhancement.

This used to work with Java 8 bytecode, but only by chance. It seems
that Java 8 bytecode relies on "synthetic", static access methods
inserted by the compiler to access the fields of entities in this test:
any access to the field is done through this access method instead of
through a direct field access. Since we apply bytecode enhancement to
all methods of entities, this means that access to fields triggers
initialization, without any bytecode enhancement in the caller class.

I believe this is specific to nested classes, but couldn't find a
source. For reference, the bytecode of access methods looks like this:

  static int access$002(org.hibernate.test.bytecode.enhancement.lazy.NaturalIdInUninitializedAssociationTest$AnEntity, int);
    Code:
       0: aload_0
       1: iload_1
       2: dup_x1
       3: putfield      #3                  // Field id:I
       6: ireturn

  static org.hibernate.test.bytecode.enhancement.lazy.NaturalIdInUninitializedAssociationTest$EntityImmutableNaturalId access$102(org.hibernate.test.bytecode.enhancement.lazy.NaturalIdInUninitializedAssociationTest$AnEntity, org.hibernate.test.bytecode.enhancement.lazy.NaturalIdInUninitializedAssociationTest$EntityImmutableNaturalId);
    Code:
       0: aload_0
       1: aload_1
       2: dup_x1
       3: putfield      #2                  // Field entityImmutableNaturalId:Lorg/hibernate/test/bytecode/enhancement/lazy/NaturalIdInUninitializedAssociationTest$EntityImmutableNaturalId;
       6: areturn

With Java 11, however, access to fields of entities is done directly,
even for nested classes. So the access methods no longer exist, and we
don't get automatic initialization upon field access. We need extended
bytecode enhancement, like we would in any other case of field access
(in particular accessing fields of non-nested classes).

(cherry picked from commit 1060baf74b3d480d026a3d88e9c4b2d4aae118a3)
2021-06-04 10:23:46 -07:00
Gail Badner
aef787589e HHH-14640 : Remove backported comment about hibernate-orm-modules having been removed; it still exists in 5.3 branch. 2021-06-03 16:10:37 -07:00
Yoann Rodière
b95f589e08 HHH-14640 Remove some JTA-related dependencies that weren't there in 5.3.20.Final 2021-06-03 16:10:37 -07:00
Andrea Boriero
b3ae29406a HHH-14640 : Fix checkstyle errors 2021-06-03 16:10:37 -07:00
Andrea Boriero
cc6fe84f30 HHH-14640 : Fix gradle errors 2021-06-03 16:10:37 -07:00
Andrea Boriero
9e454a3819 HHH-14513 Move publishing release artifacts from BinTray 2021-06-03 16:10:37 -07:00
Andrea Boriero
d644a6e8f6 HHH-14513 Move publishing release artifacts from BinTray 2021-06-03 16:10:37 -07:00
Andrea Boriero
cfe4879753 HHH-14513 Move publishing release artifacts from BinTray 2021-06-03 16:10:37 -07:00
Yoann Rodière
7887775914 HHH-14315 Upgrade to Gradle 6.7
Signed-off-by: Yoann Rodière <yoann@hibernate.org>
2021-06-03 16:10:37 -07:00
Sanne Grinovero
bacc5e6b11 HHH-14283 Review tuning of JVM parameters for the build 2021-06-03 16:10:37 -07:00
Andrea Boriero
a8d82d003f HHH-14199 fix the error when running 'setDataBase' gradle task 2021-06-03 16:10:37 -07:00
Nathan Xu
87f5cfee7a HHH-14199 fix the error when running 'setDataBase' gradle task 2021-06-03 16:10:37 -07:00
Christian Beikov
f6967b7143 HHH-14640 : Update the maven-repo-auth gradle plugin 2021-06-03 16:10:37 -07:00
Falko Modler
1fb1311342 HHH-14144 Explicitly set localization assumptions for the build and testsuite 2021-06-03 16:10:37 -07:00
Yoann Rodière
0e09e13f26 HHH-14111 Upgrade to forbiddenapis 3.0.1 2021-06-03 16:10:37 -07:00
Yoann Rodière
57077b52e3 HHH-14111 Ensure Groovy compilation tasks target the same JDK version as the rest of the project 2021-06-03 16:10:37 -07:00
Yoann Rodière
1a5579287d HHH-14111 Upgrade to biz.aQute.bnd (OSGi plugin) 5.1.1 2021-06-03 16:10:37 -07:00
Yoann Rodière
0bd52c0899 HHH-14111 Upgrade to Gradle 6.5.1 2021-06-03 16:10:37 -07:00
Andrea Boriero
729f1b75b7 HHH-14247 Fix automatic releease script, changelog.txt contains wrong Jira release url 2021-06-03 16:10:37 -07:00
Andrea Boriero
20f75163d5 HHH-14083 add task release must run after addVersionCommit task 2021-06-03 16:10:37 -07:00
Andrea Boriero
98c0a7cb7e HHH-14083 add ciRelease dependency to bintray upload 2021-06-03 16:10:37 -07:00
Andrea Boriero
00aceba685 HHH-14083 Fix issue with git command 2021-06-03 16:10:37 -07:00
Andrea Boriero
43df7fdff8 HHH-14640 : Add changeLogFile task 2021-06-03 16:10:37 -07:00
Yoann Rodière
51f402b5c7 HHH-14640 : Enable automatic Maven Central sync when calling task bintrayPublish
Copied from https://github.com/hibernate/hibernate-reactive/pull/246

Note you need to call the bintrayPublish task after calling
bintrayUpload, otherwise it won't work.

So you will need to use something like this:

./gradlew bintrayUpload bintrayPublish -P PERSONAL_BINTRAY_USER=... -P PERSONAL_BINTRAY_API_KEY=... -P SONATYPE_OSSRH_USER=... -P SONATYPE_OSSRH_PASSWORD=...
2021-06-03 16:10:37 -07:00
Yoann Rodière
b8bf21c060 HHH-14640 : Push to github atomically and only if the release succeeds 2021-06-03 16:10:37 -07:00
Yoann Rodière
e94ee2d779 HHH-14640 : Add more precondition checks to release tasks 2021-06-03 16:10:37 -07:00
Yoann Rodière
ed650b3fe6 HHH-14640 : Move the update to version.properties to a release task
This is necessary if we want to check that the working tree is empty as
part of the release process (see next commit).
2021-06-03 16:10:37 -07:00
Yoann Rodière
ab1fa97bf5 HHH-14640 : Use a less verbose syntax for git commands 2021-06-03 16:10:37 -07:00
Yoann Rodière
dfa1630334 HHH-14640 : Fix incorrect message for the second commit during release 2021-06-03 16:10:37 -07:00
Yoann Rodière
534473c653 HHH-14640 : Fix error detection in executeGitCommand
1. proc.consumeProcessErrorStream does not work correctly: it creates a
   thread to asynchronously copy the content of the stream to the string
   buffer, and does not provide any way to know when it's done. As a
   result, sometimes the buffer is correctly filled in after
   consumeProcessErrorStream returns, sometimes it's not.
2. Checking stderr to know if there was an error is not a good idea: a
   process can run just fine and give output on stderr (logs,
   basically), and a process can fail without giving any output on
   stderr. Checking the status code is more reliable.
2021-06-03 16:10:37 -07:00
Andrea Boriero
31dbc1c5a3 HHH-14640: Add gradle task to automate the CI release 2021-06-03 16:10:37 -07:00
Falko Modler
bc6048d0b7 HHH-14030 Gradle: user.language=en to avoid errors on German Win10 2021-06-03 16:10:37 -07:00
Yoann Rodière
1356e0abb8 HHH-13682 Upgrade to forbiddenapis 2.7
So that we can feed it Java 13/14 bytecode
2021-06-03 16:10:37 -07:00
Yoann Rodière
5eb8ee32c5 HHH-13682 Allow forcing the tested Java version in the Gradle build
... just in case we need that for some cutting-edge JDK, for example 15,
that would not be supported by Gradle yet.
2021-06-03 16:10:37 -07:00
Yoann Rodière
63ab97d09a HHH-13682 Generate Java 13/14 bytecode for tests when building with JDK13/14 2021-06-03 16:10:37 -07:00
Yoann Rodière
9a45c1c9f1 HHH-13682 Remove unnecessary checks around Java 8 compatibility
The build requires JDK8+, so we're alwways Java 8 compatible.
2021-06-03 16:10:37 -07:00
Andrea Boriero
40d82d6370 HHH-14640 : Fix issue with generated pom missing project description 2021-06-03 16:10:37 -07:00
Yoann Rodière
c36e2cc543 HHH-13925 Upgrade hibernate-gradle-plugin to Gradle 6 2021-06-03 16:10:37 -07:00