Commit Graph

18352 Commits

Author SHA1 Message Date
Gavin King b7af56ac76 allow @Find @Nullable and @Query @Nullable
to return null from a repository method

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 23:59:54 +02:00
Gavin King f6b366fa41 better impl of repository id lookup methods returning Optional
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 22:40:46 +02:00
Andrea Boriero f27dc7d3a8 Fix mssql LobSchemaUpdateTest failure 2024-04-11 22:40:12 +02:00
Gavin King 04d22686bb improve Jakarta Data exception messages
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 19:42:26 +02:00
Gavin King 23dc51d291 fix exceptions thrown from by-id @Find method
previously, for SS it would just return null

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 19:42:26 +02:00
Gavin King 0da311e022 fix exceptions thrown from JD lifecycle method
SS does not do exception translation

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 19:42:26 +02:00
Gavin King afc92451d9 HHH-17934 limit test to databases with proper MERGE support for now
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 16:52:30 +02:00
Gavin King e620fbb892 HHH-17934 sort out version handling in upsert()
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 16:52:30 +02:00
Gavin King 17df9bedf5 HHH-17934 generate a correct SQL merge statement
(adds the version check if necessary)

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 16:52:30 +02:00
Gavin King 3fe1f58c93 HHH-17934 test demonstrating bug
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-11 16:52:30 +02:00
Yoann Rodière a10c0311fd Disable build scans for pull requests being built on s390x
For some reason, the Develocity Gradle Plugin fails to run
./gradlew buildScanPublishPrevious and spits out errors like this:

```
Publishing build scan...

The Gradle Enterprise server (ge.hibernate.org) rejected the request due to authentication being required.
If you are able to sign in to this server in a web browser, you can authenticate your environment by running the following task:

:provisionGradleEnterpriseAccessKey

Or see https://gradle.com/help/gradle-plugin-auth for additional help with authenticating your build environment.

FAILURE: Build failed with an exception.
```
2024-04-11 16:49:15 +02:00
Yoann Rodière 631beeb1fb Publish build scans on Atlas builds too 2024-04-11 16:49:15 +02:00
Yoann Rodière 6863174a8c Safely publish build scans even for pull requests 2024-04-11 16:49:15 +02:00
Yoann Rodière e233879fce Require approval for Jenkins builds on PRs from external contributors 2024-04-11 16:49:15 +02:00
Yoann Rodière 786fbd6b84 Use an organization secret for Develocity access keys 2024-04-11 16:49:15 +02:00
Yoann Rodière 3dcaa20c25 Don't populate Develocity cache in pull requests
That's potentially dangerous.
2024-04-11 16:49:15 +02:00
Yoann Rodière 2a8183371f Properly suppress exceptions thrown in finally blocks in Jenkinsfile 2024-04-11 16:49:15 +02:00
Marco Belladelli bcbae00552 HHH-17832 Register projection usage for circular bidirectional fetch 2024-04-11 16:33:14 +02:00
Marco Belladelli 747a1024da HHH-17832 Add test for issue 2024-04-11 16:33:14 +02:00
Yanming Zhou d8df261847 Fix SqlTypes::isStringType 2024-04-11 13:48:06 +02:00
Yanming Zhou fc7fc47b64 Add more type name alias mappings
1. MySQL returns `int` even `integer` is specified
2. H2 returns `character large object` and `binary large object` even `clob` and `blob` is specified
2024-04-11 13:47:03 +02:00
Mohammad Yasin Sadeghi 64e52022bc correct a typo 2024-04-10 19:16:18 +02:00
Gavin King 0ea86a9d07 get rid of raw types and extract methods
eliminates compiler warnings

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-10 18:03:30 +02:00
Gavin King 97f96d841d improve error message, as suggested by Yoann
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-10 18:03:30 +02:00
Gavin King a2ac984162 slightly simplify generated code for pagination using static imports
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-10 17:08:38 +02:00
Christian Beikov 2343bfa513 Skip DB2 test on old DB2 versions 2024-04-10 16:24:44 +02:00
Gavin King 98c79ce53e update generated pagination code to new JD PageRequest API
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-10 15:54:34 +02:00
Yoann Rodière 56105a8fc6 HHH-17935 Do not use the "auto-enable" feature for the tenant ID filter
This filter already gets enabled automatically where relevant, and
critically it's not relevant when using a "root" tenant identifier.
2024-04-10 14:43:53 +02:00
Marco Belladelli ce97a5da2c HHH-10921 Add test for issue 2024-04-09 17:16:39 +02:00
dependabot[bot] a3a727d15f Bump com.gradle.enterprise from 3.16.2 to 3.17
Bumps com.gradle.enterprise from 3.16.2 to 3.17.

---
updated-dependencies:
- dependency-name: com.gradle.enterprise
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-09 10:00:41 +02:00
dependabot[bot] a2dac3447f Bump com.gradle.common-custom-user-data-gradle-plugin from 1.13 to 2.0
Bumps com.gradle.common-custom-user-data-gradle-plugin from 1.13 to 2.0.

---
updated-dependencies:
- dependency-name: com.gradle.common-custom-user-data-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-09 09:58:55 +02:00
Andrea Boriero e95eaf6cb3 HHH-17887 Release mode After Statment with deferred result set access does not work 2024-04-09 07:46:52 +02:00
Andrea Boriero 189de9dab7 HHH-17887 Add test for issue 2024-04-09 07:46:52 +02:00
Gavin King 3fb0f83990 fix previous-page navigation with KeyedResultList
It was returning the results in reverse order.
This caused a failure in the Data TCK.

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-08 22:37:06 +02:00
Andrea Boriero b5e78cf9d0 HHH-17826 ResultSet closed while scrolling results 2024-04-08 16:26:57 +02:00
Andrea Boriero bd740f2dbf HHH-17826 Add test for issue 2024-04-08 16:26:57 +02:00
Marco Belladelli aa7575aabd HHH-17857 Use `fromNameExact` when determining actual table group 2024-04-08 16:17:19 +02:00
Marco Belladelli 5c51ff93c6 HHH-17857 Add test for issue 2024-04-08 16:17:19 +02:00
Gavin King ec8cdd9dbb retain type use annotation in return types and simplify code
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-06 21:43:59 +02:00
Gavin King 4c1285b609 better cooperation with other Jakarta Data implementations
and with Scott's preprocessor

produce WARNINGs instead of ERRORs in some cases

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-06 17:40:21 +02:00
Gavin King baa24d6889 add a test and a comment
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-06 11:49:05 +02:00
Gavin King e43ae41f2d properly include repeatable annotations in @SupportedAnnotationTypes
this is required (see javadoc of Processor)

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-06 11:49:05 +02:00
Gavin King b0368e7135 make Jakarta Data static metamodel into interfaces
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-05 23:52:21 +02:00
Gavin King 66838ef44b add to tests
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-05 01:26:25 +02:00
Gavin King 15a2d5cb8b validate that paginated query methods have a well-defined ordering
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-05 01:26:25 +02:00
Gavin King a8f6872249 sync to latest spec and removal of sorting from PageRequest
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-05 01:26:25 +02:00
Gavin King ceefdd162a improve 'this' emulation for @Query methods
for Jakarta Data TCK work

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-05 01:26:25 +02:00
Gavin King 6b1b8d65ed look for primary entity type in indirectly-implemented interfaces
for Jakarta Data TCK work

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-04 12:16:45 +02:00
Gavin King ff0e676825 add tests reflecting things in Jakarta Data TCK
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-04 12:16:45 +02:00
Gavin King e748619dd6 remove unnecessary code, fixing bug in generated imports
for Jakarta Data TCK work

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-04 12:16:45 +02:00