11718 Commits

Author SHA1 Message Date
Gavin King
0cfb52d127 HHH-18067 get rid of a typecast to AbstractPersistentCollection
and code cleanups

(Note that this typecast has actually been there since 2012,
though it only used to happen when batching was enabled.)

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-05-03 22:11:32 +02:00
Gavin King
138e0bba01 HHH-18023 treat LockMode.WRITE as similar to PESSIMISTIC_FORCE_INCREMENT
consistent with the similar levels they have

cc @beikov

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-05-03 20:52:00 +02:00
Gavin King
8a133ac120 HHH-18068 fix case-insensitive Order
can't use ordinal column refs inside lower()

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-05-03 20:51:51 +02:00
Gavin King
bea5e4cf3d HHH-18068 tests for case-insensitive Order
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-05-03 20:51:51 +02:00
Christian Beikov
2932933c43 HHH-18066 Support de-referencing function invocation with dot and bracket syntax 2024-05-03 18:10:38 +02:00
Christian Beikov
940c898ecf Various improvements:
* Sprinkle some @Nullable annotations to better understand nullness guarantees
* Fix some potential NPEs
* Improve Oracle array_agg emulation
* Prepare for aggregate component array support
2024-05-03 16:49:39 +02:00
Christian Beikov
75e1f17139 HHH-18065 Truncate date related milliseconds from value passed to java.sql.Time 2024-05-03 16:10:54 +02:00
Christian Beikov
17fec64fd7 Make the JDBC type to use for array/collection types configurable 2024-05-03 16:07:19 +02:00
Marco Belladelli
b273c17592 Skip binary arithmetic parameter inference test for CockroachDB 2024-05-03 15:12:31 +02:00
Marco Belladelli
2769fd1b3c Set serial_normalization to avoid Integer overflow 2024-05-03 15:12:31 +02:00
Marco Belladelli
f5de1972e7 Fix java 17 bytecode-enhanced test missing imports 2024-05-03 10:37:45 +02:00
Marco Belladelli
b16b891be0 HHH-17837 Render target-side key for explicit plural joins when needed
Also, change how we determine whether we need to use the target-side to only the strictly needed cases (non-optimizable joins, `group by` or `order by` clauses)
2024-05-03 08:48:20 +02:00
Marco Belladelli
21bfc5c19f HHH-17837 Add test for issue 2024-05-03 08:48:20 +02:00
Gavin King
d0ed4d01f2 squash some compiler warnings
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-05-02 20:18:27 +02:00
Gavin King
72261fd806 HHH-18020 realign behavior of ClobJdbcType with BlobJdbcType
there was some organic divergence here
2024-05-02 20:18:27 +02:00
Gavin King
c955150b27 minor code cleanups
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-05-02 20:18:27 +02:00
Christian Beikov
88bdfbfbd4 HHH-18046 Cast parameters used as arithmetic operands on DB2 2024-05-02 18:18:49 +02:00
Christian Beikov
5d4ffac58d HHH-18018 Use NO_PLAIN_PARAMETER for Derby functions that use the length function 2024-05-01 10:33:24 -05:00
marko-bekhta
19e495d8da Convert bytecodeenhanced tests to use JUnit 5 extensions 2024-05-01 07:36:14 -05:00
Sanne Grinovero
85364a2c53 HHH-18011 Extract reusable constants from EnhancerImpl 2024-05-01 11:59:35 +01:00
Sanne Grinovero
a92bf606a9 HHH-18011 Extract DefaultEnhancerClassFileLocator and allow using a different implementation 2024-05-01 11:59:35 +01:00
Christian Beikov
3578ed845f HHH-18036 Truncate time-related milliseconds when creating a java.sql.Date 2024-05-01 00:08:25 +02:00
Yanming Zhou
ecaeea414d HHH-18034 Configuration property hibernate.event.listener.eventType should be more lenient against spaces 2024-04-30 11:57:12 +01:00
Gavin King
fe7b3c9e7e HHH-18023 fix questionable test
PESSIMISTIC_READ is not really a "more exclusive" lock than UPGRADE_NOWAIT

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-28 20:37:18 +02:00
Gavin King
1e0e0ac02b HHH-18023 fix wrong test assertions
OPTIMISTIC means the version gets checked at end of tx,
this lock mode is never acquired implicitly

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-28 20:37:18 +02:00
Gavin King
1657702015 HHH-18024 fix getLockMode() on read-only entity
it resulted in spurious exception claiming entity was deleted

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-28 20:37:18 +02:00
Gavin King
789cc12b8e HHH-18023 fix bugs with versioned LockModes
- NPE at commit time for OPTIMISTIC on entity with no version
- LockMode.OPTIMISTIC treated as equivalent to LockModeType.OPTIMISTIC

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-28 20:37:18 +02:00
Gavin King
39a6f9880b clean up CacheModeHelper
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-28 20:37:18 +02:00
Gavin King
60a732152f clean an unused import
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-27 01:29:56 +02:00
Jan Schatteman
1b057b8f1f HHH-17967 - Add test for issue (already fixed on main, fails pre-6.5)
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2024-04-25 16:39:21 +02:00
Andrea Boriero
2202487633 HHH-17964 Hibernate using wrong column order for ElementCollection query when composite ID is present 2024-04-25 09:59:13 +02:00
Andrea Boriero
a1739979d1 HHH-17964 Add test for issue 2024-04-25 09:59:13 +02:00
Gavin King
b102a6e2c9 slightly improve format of error message
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-24 22:41:02 +02:00
Marco Belladelli
181399f84c HHH-17983 Remove entity keys from batch queue before loading 2024-04-24 11:37:53 +02:00
Marco Belladelli
882709bdf8 HHH-17983 Add test for issue 2024-04-24 11:37:53 +02:00
Marco Belladelli
ce56234857 HHH-17883 Correct original column order for primary keys 2024-04-24 11:36:46 +02:00
Marco Belladelli
0c8bfefd1c HHH-17883 Add test for issue 2024-04-24 11:36:46 +02:00
Christian Beikov
bda95dfbe7 Fix HANA dialect doesRoundTemporalOnOverflow 2024-04-23 17:59:12 +02:00
Christian Beikov
969ecaae58 Fix SybaseASEDialect column length resolution 2024-04-23 17:08:18 +02:00
Marco Belladelli
7adab31924 HHH-17818 Add a UG paragraph and examples for @ConcreteProxy 2024-04-23 15:37:22 +02:00
Marco Belladelli
84cb94b990 HHH-17818 Introduce new @ConcreteProxy annotation
Also, preserve laziness for optional + ConcreteType associations
2024-04-23 15:37:22 +02:00
Gavin King
2bc78d50b0 HHH-17999 use Supplier instead of Constructor
this is quite a lot cleaner

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-23 15:28:38 +02:00
Gavin King
0468e04955 HHH-17999 use Constructor<Expectation> instead of Class<Expectation>
for Quarkus

Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-23 15:28:38 +02:00
Andrea Boriero
42cbbc3a0c HHH-17965 @ElementCollection with @CollectionTable throws o.h.MappingException Foreign key must have same number of columns as the referenced primary key 2024-04-23 13:51:10 +02:00
Andrea Boriero
a3690b1e68 HHH-17965 Add test for issue 2024-04-23 13:51:10 +02:00
Sanne Grinovero
8f277d4b1c HHH-17993 Metamodel processing on bootstrap: avoid retrying same metamodel class name multiple times 2024-04-22 21:26:33 +01:00
Sanne Grinovero
4c3f8a625d HHH-17991 Reduce overhead from @DialectOverride discovery 2024-04-22 13:28:56 +01:00
Gavin King
c71967d6c1 code cleanups to EnhancementAsProxyLazinessInterceptor
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-22 13:08:02 +02:00
Gavin King
caab8a97fc squash jdoc warnings
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-22 13:08:02 +02:00
Gavin King
8df8fd37be HHH-17984 StatelessSession statistics for collections
Signed-off-by: Gavin King <gavin@hibernate.org>
2024-04-22 13:08:02 +02:00