Commit Graph

7968 Commits

Author SHA1 Message Date
Christian Beikov 779cbef20c Fix tests for HANA 2021-12-22 14:45:53 +01:00
Christian Beikov 29bfb799aa Fix some test issues with HANA and emulate derived table column naming on HANA 2021-12-21 18:59:08 +01:00
Christian Beikov 39484b160d Cleanup support for virtual embeddable model parts and reuse existing compatible joins for implicit joins 2021-12-21 18:59:08 +01:00
Christian Beikov d5d350e5e7 HHH-11433 Allow usage of KEY expression in a join 2021-12-21 18:59:08 +01:00
Christian Beikov 360fec82f1 Reset connection pool after changing system TZ. Don't use distinct predicate when comparing primary keys in envers 2021-12-21 18:46:46 +01:00
Andrea Boriero dcd4479cf1 Fix instantiation of composite property ref 2021-12-21 13:00:02 +01:00
Steve Ebersole c5f719ef39 clean up javadoc 2021-12-18 19:14:07 -06:00
Steve Ebersole f0e7b2160b 6.0 Final tasks - general test_legacy dir clean-up
Drop test that where either copied over or had corresponding tests

- leaves just the "bulkid" tests
2021-12-18 18:43:25 -06:00
Steve Ebersole f9fa2e6e53 6.0 Final tasks - general test_legacy dir clean-up
At this point, everything left in test_legacy is something I think we want to account for in the test suite (move it, etc)
2021-12-18 12:37:28 -06:00
Steve Ebersole 8f9d200936 6.0 Final tasks - analyze legacy Criteria tests
See if anything makes sense as additions to SqmNodeBuilder (as JPA CriteriaBuilder extension); make list; delete

The only one I considered was support for the legacy `Restrictions#naturalId`
2021-12-18 12:18:02 -06:00
Steve Ebersole 7c604d7c3b HHH-14977 - @Where is broken in 6.0
Fix up bad rebase of https://github.com/hibernate/hibernate-orm/pull/4465 (Make TableReference an interface with various sub-classes) on top of this work
2021-12-18 07:43:32 -06:00
Gavin King 863802cfd0 proposed API for instantiation of detached collections + proxies
this is useful for object-graph deserialization
2021-12-18 05:22:24 -06:00
Christian Beikov d1a732fcf1 Tryout a deterministic test class order 2021-12-18 05:12:36 -06:00
Christian Beikov fb30206387 Add emulation for simple lateral joins and make use of lateral joins for min/max index/element paths if possible 2021-12-18 05:12:36 -06:00
Christian Beikov ab954925e4 Simplify TableJoin to only allow the distinction between inner and left joins 2021-12-18 05:12:36 -06:00
Christian Beikov 1988ffa310 Support lateral joins by introducing a lateral flag in TableGroupJoin and add a FunctionTableReference for table valued functions 2021-12-18 05:12:36 -06:00
Christian Beikov b75277b421 Split TableReference class into interface and NamedTableReference implementation to allow QueryPartTableReference and ValuesTableReference to fit into the picture 2021-12-18 05:12:36 -06:00
Gavin King 70114d30ec treat integral types as equivalent for purposes of schema validation/update 2021-12-18 05:08:26 -06:00
Andrea Boriero d6bdca77f2 Fix Stack Overflow caused by EntitySelectFetchByUniqueKeyInitializer 2021-12-18 04:45:48 -06:00
Fabio Massimo Ercoli ecd9d2a193 Test eager cycles derived by 1to1 owner by contained 2021-12-18 04:45:48 -06:00
Steve Ebersole 335a4d62e3 HHH-14977 - @Where is broken in 6.0
`@Where` and `@Filter` fragments are now fully handled as AST - each fragment gets its own Predicate instance.

Some more work coming to clean up methods we no longer use which require the old String-manip approach.
2021-12-18 04:26:49 -06:00
Steve Ebersole 4c758b2d48 HHH-14977 - @Where is broken in 6.0
`@Where` and `@Filter` fragments are now fully handled as AST - each fragment gets its own Predicate instance.

Some more work coming to clean up methods we no longer use which require the old String-manip approach.
2021-12-17 19:09:09 -06:00
Steve Ebersole 1c5ec0612c HHH-14977 - @Where is broken in 6.0
`@Where` and `@Filter` fragments are now fully handled as AST - each fragment gets its own Predicate instance.

Some more work coming to clean up methods we no longer use which require the old String-manip approach.
2021-12-17 19:07:46 -06:00
Christian Beikov 9d75e6d620 Fix some wrong assignability checks 2021-12-17 18:30:26 +01:00
Andrea Boriero f765eb4a87 Fix issue with Hibernate proxy 2021-12-17 18:30:26 +01:00
Fabio Massimo Ercoli d845f4b066 Test load of polymorphic entities 2021-12-17 18:30:26 +01:00
Andrea Boriero 5626b075dc Fix instantiation of VirtualId 2021-12-17 18:29:53 +01:00
Christian Beikov c92a475892 Get rid of unnecessary lexer rules 2021-12-17 15:40:08 +01:00
Andrea Boriero 017d1a2dcd Reenable additional tests 2021-12-17 09:06:09 +01:00
Christian Beikov b75c2117b2 Fix resolving table references for discriminator path 2021-12-17 08:23:53 +01:00
Gavin King bc65526c77 clean up the Dialect-specific default property handling 2021-12-16 15:58:47 +01:00
Fabio Massimo Ercoli 28b8b33b88 Support multiload by single natural id 2021-12-15 10:52:43 -06:00
Fabio Massimo Ercoli 2814c05399 Test multiload on single event 2021-12-15 10:52:43 -06:00
Fabio Massimo Ercoli 647c2a923c Use single loader to load single instance on multiloading 2021-12-15 10:52:43 -06:00
Fabio Massimo Ercoli cef98f67a9 Test multiloading on partial cached entities 2021-12-15 10:52:43 -06:00
Steve Ebersole 579b3f0dcb HHH-14977 - @Where is broken in 6.0
Next iteration where `@Where` fragments generate AST one or more `WhereFilterPredicate` instances.

At the moment, `@Filter` fragments are collected together using the existing String-manipulation style and still collected into a single `FilterPredicate`.  Next step is to make that more AST-centric and hopefully get rid of the String-manip-based methods
2021-12-15 10:49:49 -06:00
Andrea Boriero a4b574e826 @FailureExpected annotation added to tests in orm 6 substituted with @NotImplementedYet 2021-12-15 09:56:07 +01:00
Gavin King bd9276d6d7 clean up version stuff in DB2i/z dialects 2021-12-15 08:56:50 +01:00
Gavin King e992b41756 clean up constructor model in Dialects
and fix strange model of versions on Maria/TiDB
2021-12-14 22:54:27 +01:00
Gavin King e2be0960fd let's not use LONGVARCHAR to mean two different things 2021-12-14 22:54:27 +01:00
Gavin King eb3bcdb94a reworked approach to Dialect column type customization 2021-12-14 22:54:27 +01:00
Steve Ebersole 103e5c658b HHH-14977 - @Where is broken in 6.0
simple fix hooking in to the existing String based building. working on a version that
uses the AST
2021-12-14 15:36:12 -06:00
Andrea Boriero d89b28e1a9 Re-enabled additional tests 2021-12-14 13:36:24 +01:00
Andrea Boriero 6ebceedf48 Fix Query#getParameters() returning an empty Set when the query has no parameters 2021-12-14 13:36:24 +01:00
Andrea Boriero ba558503a8 Fix thowing IllegalArgumentException when accessing procedure not registered parameters 2021-12-14 13:36:24 +01:00
Andrea Boriero a6ee855d29 Fix thowing IllegalArgumentException when accessing procedure not registered parameters 2021-12-14 13:36:24 +01:00
Andrea Boriero fa499dff94 Fix issue with ResultSetMapping resolution 2021-12-14 13:36:24 +01:00
Christian Beikov c4e7e2b3fe Fix support for dropping local temporary tables 2021-12-14 13:00:14 +01:00
Christian Beikov eecda61ceb Move more tests and fix subselect support 2021-12-14 13:00:14 +01:00
Ivaylo Mitrev b9814f5cef HHH-14948 Adapt contributed patch to 6.0 branch 2021-12-13 21:30:46 +00:00
Gavin King 1172943252 fix broken float type precision conversion
it is not the case that ln(10) = log_2(10)
2021-12-13 13:56:17 +01:00
Andrea Boriero 36be5cc3da Re-enabled additional tests 2021-12-13 13:44:36 +01:00
Steve Ebersole fcda293c5e HHH-14975 - Allow use of auto-applied AttributeConverter as native-query result or parameter 2021-12-12 15:47:57 -06:00
Steve Ebersole 38fa2aef75 HHH-13082 - Support specifying an AttributeConverter class as a @ColumnResult#type 2021-12-12 15:14:28 -06:00
Steve Ebersole bd784b6e90 Misc cleanup related to `MultiLoader` hierarchy 2021-12-12 12:40:34 -06:00
Steve Ebersole 8fef9c4de4 Test for https://hibernate.atlassian.net/browse/HHH-11784 2021-12-11 20:09:03 -06:00
Gavin 0ca7a659b0 "long" varchar/varbinary mappings
add Length class with useful constant values
well-defined mappings for "long" varchar/varbinary types
make LONGVARCHAR a synonym for VARCHAR with length=LONG32
make LONGVARBINARY a synonym for VARBINARY with length=LONG32
add Dialect.getMaxVarcharLength() + friends
make schema validator ignore the differences between string types
2021-12-11 21:27:01 +01:00
Steve Ebersole a35ad1905b HHH-10832 - Remove org.hibernate.property.access.spi.EnhancedGetterMethodImpl 2021-12-10 15:14:39 -06:00
Steve Ebersole a87157ddb8 fix Derby test failures 2021-12-10 14:42:56 -06:00
Steve Ebersole 64af4885b9 HHH-14950 - Support mapping of embeddables with no setters w/ custom instantiator
HHH-14964 - EmbeddableInitializer are called multiple times
2021-12-10 14:39:51 -06:00
Steve Ebersole 1e4f1fef44 HHH-14950 - Support mapping of embeddables with no setters w/ custom instantiator
HHH-14964 - EmbeddableInitializer are called multiple times

HHH-14950 works for the most part, but cannot be used "for real" because of HHH-14964
2021-12-10 13:40:06 -06:00
Steve Ebersole a2a6425b82 fix Oracle test failures 2021-12-10 13:36:53 -06:00
Fabio Massimo Ercoli c6ed830d82 Cache and expose column size 2021-12-10 10:08:07 -05:00
Andrea Boriero e08a7665c8 Fix load of entity with Date[] field 2021-12-10 10:21:40 +01:00
Fabio Massimo Ercoli 15121842f1 Test persist of array of dates 2021-12-10 10:21:40 +01:00
nathan.xu 62e55f3c3c HHH-14970 make use of new Java language features from v8 to v11 2021-12-09 21:26:04 -05:00
Gavin King 0bb647e62b revert to previous design with raw types
there is a problem with this approach: the user now gets unchecked
warnings since we've recently filled in the type args of the params
of some methods of Query and NativeQuery

but it's very hard to see how to fix the problem without breaking
compatibility
2021-12-09 21:25:31 -05:00
Gavin King a1e3f0cd6f fix some warnings and clean up some typing issues
this is a general cleanup of the Session + Query hierarchies
2021-12-09 21:25:31 -05:00
Fabio Massimo Ercoli b91944c09a Support statistics when criteria(s) are executed 2021-12-09 15:04:35 -05:00
Fabio Massimo Ercoli f05f002c22 Test statistics of criteria(s) executed 2021-12-09 15:04:35 -05:00
Steve Ebersole e6d4bc6cfa More documentation work 2021-12-09 13:03:34 -06:00
Gavin King b889375eb6 remove left-behind method createSQLQuery() from StatelessSession 2021-12-09 12:59:04 -05:00
Gavin King 6177210395 remove Session.disconnect()/reconnect()
this stuff is so old and so bad that it's not even worth deprecating
2021-12-09 12:38:55 -05:00
Gavin King 042bd47825 finally remove all remaining traces of Session.connection() 2021-12-09 12:38:55 -05:00
Gavin King 75fc936b95 improve the javadoc for AttributeBinder+AttributedBinderType 2021-12-09 18:31:31 +01:00
Gavin King b1ed206339 replace use of <br> with <p> in all the javadoc 2021-12-09 16:22:43 +01:00
Steve Ebersole 44fea07abf HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations
2021-12-09 07:45:44 -06:00
Steve Ebersole 703eaf22a0 HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations
2021-12-09 07:20:28 -06:00
Steve Ebersole 7a6cef5838 Miscellaneous
- Finished DialectVersion
- User Guide tidying
- User Guide section on AttributeBinder
2021-12-09 00:51:40 -06:00
Steve Ebersole fa4b76702c HHH-14950 - Support mapping of embeddables with no setters (assuming a custom instantiator or repo-strategy is used)
Tests;
Remove `ComponentTuplizer` and friends;
Remove `ComponentMetadata`
2021-12-08 21:17:05 -06:00
Steve Ebersole 09cc6d7b00 HHH-14950 - Support mapping of embeddables with no setters (assuming a custom instantiator or repo-strategy is used)
Tests
2021-12-08 17:42:13 -06:00
Steve Ebersole 37bc00e567 HHH-10558 - Add support for java.time.Year;
HHH-13393 - Add support for ZoneId

ZoneOffsetJavaTypeDescriptor was already added
2021-12-08 17:31:02 -06:00
Gavin King 61cba87096 fix the signature of Session.merge()
previously Session.merge() erased the generic type parameter
inherited from the supertype, obligating the client code to
perform a typecast
2021-12-08 17:01:21 -05:00
Steve Ebersole 942dd7283f DialectVersion
- rename `#isSince` to `#isSameOrAfter`
2021-12-08 15:54:50 -06:00
Steve Ebersole 10d759e139 Dialect version 2021-12-08 15:36:48 -06:00
Steve Ebersole d354d49ab1 added `DatabaseVersion#getCanonicalVersion` 2021-12-08 15:07:30 -06:00
Steve Ebersole 43206b02fc initial work on DatabaseVersion#isAfter 2021-12-08 15:07:30 -06:00
Steve Ebersole ad48a01e2c Fix PropertyBinder to use HCANNHelper to resolve meta-annotations 2021-12-08 14:54:13 -06:00
Steve Ebersole 848c9f0914 HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations;
HHH-14959 - Drop IdentifierGeneratorFactory as a Service;
HHH-14960 - Add @GeneratorType for better custom generator config;
HHH-14496 - Deprecate (or drop) IdGeneratorStrategyInterpreter;
HHH-14961 - Deprecate (or drop) IdentifierGeneratorStrategyProvider;
HHH-14962 - Delay actual creation of IdentifierGenerator instances as late as possible

Add `GenerationTypeStrategy` and `GenerationTypeStrategyRegistration`;
deprecate org.hibernate.jpa.spi.IdentifierGeneratorStrategyProvider
2021-12-08 14:35:09 -06:00
Steve Ebersole 3c97ac2077 HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations;
HHH-14959 - Drop IdentifierGeneratorFactory as a Service;
HHH-14960 - Add @GeneratorType for better custom generator config

Fixed CustomGeneratorTests failure on databases which do not support sequences
2021-12-08 14:35:09 -06:00
Steve Ebersole 1e8f6f9bbd HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations;
HHH-14959 - Drop IdentifierGeneratorFactory as a Service;
HHH-14960 - Add @GeneratorType for better custom generator config

org.hibernate.id.factory.spi.StandardGenerator
2021-12-08 14:35:09 -06:00
Steve Ebersole c5ad9e129e HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations;
HHH-14959 - Drop IdentifierGeneratorFactory as a Service;
HHH-14960 - Add @GeneratorType for better custom generator config
2021-12-08 14:35:09 -06:00
Steve Ebersole ce4f22f400 HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations;
HHH-14959 - Drop IdentifierGeneratorFactory as a Service;
HHH-14960 - Add @GeneratorType for better custom generator config
2021-12-08 14:35:09 -06:00
Steve Ebersole c394261508 HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations;
HHH-14959 - Drop IdentifierGeneratorFactory as a Service
2021-12-08 14:35:02 -06:00
Gavin King ce3644e81d add a wildcard to generic type
and slightly improve javadoc
2021-12-08 08:44:09 -05:00
Gavin King 13983e1449 detect the MultiTenantConnectionProvider when registered as a service
instead of looking at the property
2021-12-08 08:44:09 -05:00
Gavin King 6d43d62a5a fix test fallout from rebase
update test to jakarta package name
and refix moved tests
2021-12-08 08:44:09 -05:00
Gavin King 8f7e0c4c2f HHH-6054 introduce notion of a "root" tenant 2021-12-08 08:44:09 -05:00
Gavin King 47d0b1265f improve the test for tenant ids 2021-12-08 08:44:09 -05:00
Gavin King 341eb413f0 clean up PropertyBinder a bit 2021-12-08 08:44:09 -05:00
Gavin King 2a2bf17f8f redefine AttributeAccessor in terms of the new AttributeBinder API 2021-12-08 08:44:09 -05:00
Gavin King 5837a60e71 HHH-6054 introduce AttributeBinder and @AttributeBinderType
and introduce TenantIdBinder on top of this stuff
also make @TenantId imply non-null, immutable
2021-12-08 08:44:09 -05:00
Gavin King ea0dd35362 HHH-6054 improve error checking 2021-12-08 08:44:09 -05:00
Gavin King 8af548b52d HHH-6054 allow ValueGenerator to inspect current value of property
use this to throw exception from TenantIdGeneration
2021-12-08 08:44:09 -05:00
Gavin King 505bea6ffd HHH-6054 support for discriminator-based multitenancy
added the @TenantId annotation
also allow @TenantId @Formula
2021-12-08 08:44:09 -05:00
gavin b2e6965577 remove MultiTenancyStrategy
Use the existence of a MultiTenantConnectionProvider to infer that multitenancy is enabled.
2021-12-08 08:44:09 -05:00
Steve Ebersole 915da5228d HHH-14497 - Drop legacy id-generator settings;
HHH-14718 - Drop deprecated generator implementations
2021-12-07 11:12:44 -06:00
Andrea Boriero 189bc54dbd Fix EntityEntry loaded state for persistent arrays 2021-12-07 16:30:57 +01:00
Christian Beikov 6c4ec95182 * Cleanup temporary table handling in dialects
* Fix insert handling with respect to version, discriminator and generated identifier insertion
* Introduce SqmMultiTableInsertStrategy to handle multi-table inserts
* Introduce the notion of an "entity table" similar to the "id table" to handle multi-table insertions
* Implement table based and cte based multi-table insertion to support all dialects
* Implement identifier generator optimizer support for multi-table insert
* Fix validation of insert target paths against select item types
* Fix some DML validations
* Implement over-clause support in SQL AST
* Fix multi-valued filter parameter support
2021-12-07 15:54:01 +01:00
Andrea Boriero c959c7656c Fix IdentifiableType#getId(Class<Y> type) failing for primitive types 2021-12-07 12:49:10 +01:00
Yoann Rodière 37d3b66ce4 HHH-14922 Give precedence to default catalog/schema over implicit catalog/schema 2021-12-07 08:25:50 +01:00
Yoann Rodière 30e3aa4e7f HHH-14922 Delay applying the implicit catalog/schema until schema management tool or session factory creation
This is necessary if we want the default catalog/schema to take
precedence, since the default catalog/schema is applied late,
on schema management tool or session factory creation.
2021-12-07 08:25:50 +01:00
Yoann Rodière 8f1d1c43ce HHH-14922 Test behavior when setting both implicit catalog/schema and default catalog/schema 2021-12-07 08:25:50 +01:00
Yoann Rodière aafacbec47 HHH-14921 Test handling of default catalog and schema when not configured during metadata creation 2021-12-07 08:25:50 +01:00
Yoann Rodière 944c90061a HHH-14921 Test handling of default catalog and schema 2021-12-07 08:25:50 +01:00
Yoann Rodière 4d5306a82d HHH-14921 Delay determination of the default catalog/schema until schema management tool or session factory creation 2021-12-07 08:25:50 +01:00
Yoann Rodière 495bd51caa HHH-14921 Always use SqlStringGenerationContext for generation of SQL strings involving table/sequence names 2021-12-07 08:25:50 +01:00
Yoann Rodière b6f833441a HHH-14921 Delay generation of SQL strings by identifier generators until schema export or session factory creation 2021-12-07 08:25:50 +01:00
Yoann Rodière 0c644fa16d HHH-14921 Remove unused method PersistentIdentifierGenerator#generatorKey 2021-12-07 08:25:50 +01:00
Yoann Rodière 16524e2f67 HHH-14921 Remove a few unused SQL generation methods in identifier generators
They are getting in the way of changes related to the default schema
2021-12-07 08:25:50 +01:00
Yoann Rodière cc13379c77 HHH-14921 Clarify that org.hibernate.mapping.AuxiliaryDatabaseObject has been replaced with org.hibernate.boot.model.relational.AuxiliaryDatabaseObject 2021-12-07 08:25:50 +01:00
Yoann Rodière 012bcd1cfb HHH-14921 Clarify the ability of IdentifierGenerator to be configured and to register exportables 2021-12-07 08:25:50 +01:00
Christian Beikov 05d536d345 Polishing: fix wrong variable name 2021-12-06 20:29:59 +01:00
Christian Beikov e1a976bce0 HHH-14211 Switch to using oid for CLOB in PostgreSQL to avoid losing data after vacuumlo 2021-12-06 20:27:55 +01:00
Steve Ebersole 0f46ee2466 Tests for checking multiple execution of EmbeddableInitializers 2021-12-06 13:26:48 -06:00
Steve Ebersole 099dd55b94 Tests for checking multiple execution of EmbeddableInitializers 2021-12-06 12:30:10 -06:00
Andrea Boriero acc870ea14 Merge branch 'wip/6.0' of https://github.com/hibernate/hibernate-orm into wip/6.0 2021-12-06 17:46:12 +01:00
Andrea Boriero 74a395d744 Merge branch 'main' into wip/6.0 2021-12-06 17:39:07 +01:00
Christian Beikov bab32c3100 Small cleanup and add migration guide sections 2021-12-06 17:21:25 +01:00
Steve Ebersole 9028adc30e Clean up test logging (hibernate-core) 2021-12-06 10:12:25 -06:00
Christian Beikov 2d871d64f2 HHH-14897 Allow ordering with nulls first/last in JPA Criteria 2021-12-06 16:49:20 +01:00
Andrea Boriero 7dc70e9350 Fix ToOneAttributeMapping bidirectionalAttributeName value determination 2021-12-06 16:43:44 +01:00
Fabio Massimo Ercoli 71204a9e97 Test load contained in double containing 2021-12-06 16:43:44 +01:00
Steve Ebersole 087d486d6b Tests for debugging potential multiple calls to EmbeddableInstantiators 2021-12-04 13:53:10 -06:00
Steve Ebersole 9287b97cd3 HHH-14949 - Support @Access on @ElementCollection (for embeddable elements)
Fix
2021-12-03 15:32:13 -06:00
Steve Ebersole 86799d6c28 HHH-14949 - Support @Access on @ElementCollection (for embeddable elements)
Test
2021-12-03 15:32:13 -06:00
Steve Ebersole c190d37a57 initial work on DialectVersionDetails.isAfterDatabaseVersion 2021-12-02 21:36:52 -06:00
Steve Ebersole 9367561fe4 6.0 Beta2 2021-12-02 16:46:09 -06:00
Steve Ebersole 8203da2de1 Fix EnhancedProxy with Embeddable and Lazy BasicAttribute
- added log message when this condition occurs
- tried adding a `LoggerInspectionRule` based assertion to the test, but found that that rule is unfortunately very dependent on the message actually being logged
2021-12-02 15:44:17 -06:00
Fabio Massimo Ercoli 9f155a95ab Fix EnhancedProxy with Embeddable and Lazy BasicAttribute 2021-12-02 15:44:17 -06:00
Jan Schatteman 69cd716e37
Revert deprecations on main (#4412)
* Revert "HHH-14857 - Deprecations in preparation for 6"

This reverts commit 91e29358be.

* Revert "HHH-14857 - Deprecations in preparation for 6"

This reverts commit e4b56b9271.
2021-12-02 22:06:01 +01:00
Steve Ebersole ae25b651ca HHH-14885 - New composite user-type
HHH-14951 - Add @EmbeddableRepresentationStrategy

Prep work for `@EmbeddableRepresentationStrategy` - mostly move things from spi package to api, generally all marked `@Incubating`
2021-12-02 14:49:23 -06:00
Steve Ebersole e06a3dcdbc HHH-14885 - New composite user-type
HHH-14950 - Support mapping of embeddables with no setters (assuming a custom instantiator or repo-strategy is used)

Tests illustrating that HHH-14950 does indeed happen
2021-12-02 12:49:16 -06:00
Steve Ebersole 4b69854b9c HHH-14885 - New composite user-type
Initial work on interface-based embeddables with custom instantiator
2021-12-02 12:42:14 -06:00
Steve Ebersole 8339dffb88 HHH-14885 - New composite user-type
Initial work on interface-based embeddables
2021-12-02 06:52:22 -06:00
Christian Beikov 4cdc1c24fa Cleanup some model part APIs 2021-12-02 13:20:47 +01:00
Christian Beikov 47416b9e24 Fixup review comments 2021-12-02 13:17:53 +01:00
Andrea Boriero 9392b94ee7 Fix MatchingIdSelectionHelper#selectMatchingIds 2021-12-02 13:17:53 +01:00
Andrea Boriero b436392167 Re-enable additional tests 2021-12-02 13:17:53 +01:00
Andrea Boriero 7fa5d45175 Fix resolving id columns for NativeQuery with inplicit joins and aliases 2021-12-02 13:17:53 +01:00
Andrea Boriero 9bd5360bf2 Re-enabled additional tests 2021-12-02 13:17:53 +01:00
Andrea Boriero 9ef99082e1 Re-enabled additional tests 2021-12-02 13:17:53 +01:00
Andrea Boriero 0fd83cf649 Fix resolving id columns for NativeQuery with inplicit joins and aliases 2021-12-02 13:17:53 +01:00
Andrea Boriero 91cc3d8d51 Re-enabled additional tests 2021-12-02 13:17:53 +01:00
Andrea Boriero 16460cf3ab Re-enable additional tests 2021-12-02 13:17:53 +01:00
Fabio Massimo Ercoli 430071027c Avoid to recreate the DomainParameterXref twice 2021-12-02 12:53:57 +01:00
Fabio Massimo Ercoli 427204910c Cache only immutable part of HqlInterpretation
So that it can be reused safely from different threads
2021-12-02 12:53:57 +01:00
Fabio Massimo Ercoli 8c369f1998 Test concurrent queries with multiple params 2021-12-02 12:53:57 +01:00
Andrea Boriero 8d9ce9cd0e Fix test failures for MySql, Derby and Sybase 2021-12-02 11:35:47 +01:00
Steve Ebersole 9137b9e79a HHH-14885 - New composite user-type
`@EmbeddableInstantiatorRegistration`
2021-12-01 20:47:14 -06:00
Steve Ebersole 61d178ef1b HHH-14885 - New composite user-type
`@EmbeddableInstantiatorRegistration`
2021-12-01 18:16:29 -06:00
Steve Ebersole 924c2b29c3 HHH-14885 - New composite user-type
Working support for `@EmbeddableInstantiator` on either the embedded site or on the embeddable class.
2021-12-01 17:35:43 -06:00
Steve Ebersole 8ab27a0ff0 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
- shared `#finishInitialization` handling for `VirtualIdEmbeddable` and `IdClassEmbeddable`
      note: was not yet able to get that working with `EmbeddableMappingType`
  - clean up ComponentType, esp wrt its use of ComponentTuplizer

Still need to
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 13:48:51 -06:00
Steve Ebersole 55bfc59db1 fix gradle deprecations 2021-12-01 11:50:36 -06:00
Sanne Grinovero 334aeb1349 HHH-14946 Upgrading base requirements to Java 11 2021-12-01 17:34:28 +00:00
Steve Ebersole dc744844e4 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
- Clean up Component Type, removing as many calls to its tuplizer as possible atm
- Clean up ManagedMappingType, EntityPersister, etc - mainly work around getting and setting value(s)

Still need to
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
  - clean up ComponentType, esp wrt its use of ComponentTuplizer
2021-12-01 11:33:03 -06:00
Steve Ebersole b23c2f48c1 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
- Clean up Component Type, removing as many calls to its tuplizer as possible atm
- Clean up ManagedMappingType, EntityPersister, etc - mainly work around getting and setting value(s)

Still need to
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
  - clean up ComponentType, esp wrt its use of ComponentTuplizer
2021-12-01 11:33:03 -06:00
Steve Ebersole eb5afb0427 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
Move all component instantiations to use the new mapping model EmbeddableInstantiator

Still need to
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
  - clean up ComponentType, esp wrt its use of ComponentTuplizer
2021-12-01 11:33:03 -06:00
Steve Ebersole 5b44aa5d44 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
EmbeddableInitializer fully uses EmbeddableInstantiator and value injection

Still need to
  - integrate EmbeddableInstantiator work (ComponentType/ComponentTuplizer)
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 11:33:03 -06:00
Steve Ebersole a9fce4b69d Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
EmbeddableInitializer fully uses EmbeddableInstantiator and value injection

Still need to
  - integrate EmbeddableInstantiator work (ComponentType/ComponentTuplizer)
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 11:33:03 -06:00
Steve Ebersole 82d884d65c Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
Prep work for EmbeddableInstantiator - initializer

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 11:33:03 -06:00
Steve Ebersole 42d1fcca19 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
Prep work for EmbeddableInstantiator - initializer

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 11:33:03 -06:00
Steve Ebersole 142299e7a8 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
Prep work for EmbeddableInstantiator - initializer

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 11:33:03 -06:00
Steve Ebersole 29ed0a0566 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
Prep work for EmbeddableInstantiator - initializer

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 11:33:03 -06:00
Steve Ebersole 01c6b144ce Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
Prep work for EmbeddableInstantiator - initializer

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 11:33:03 -06:00
Steve Ebersole 185bcd43aa Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
Prep work for EmbeddableInstantiator - initializer

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
  - ability to use the containing composite owner as the parent of a composite (legacy behavior is to always use the "first" entity
2021-12-01 11:33:03 -06:00
Steve Ebersole d506bb379c Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable` + instantiators
More clean-up (Tuplizers!!)

Mostly EntityTuplizer in this commit

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
2021-12-01 11:33:02 -06:00
Steve Ebersole bb2b0a6c47 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable`
Clean-up

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
2021-12-01 11:33:02 -06:00
Steve Ebersole 0322d8fa84 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable`
EmbeddableInstantiator

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
2021-12-01 11:33:02 -06:00
Steve Ebersole 546a635be9 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable`
Added new form of `SqlExpressionResolver#createColumnReferenceKey`

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
2021-12-01 11:33:02 -06:00
Steve Ebersole 86e8b2751c Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable`
This 3rd commit cleans up some code

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
2021-12-01 11:33:02 -06:00
Steve Ebersole dd4f380ea9 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable`
This second commit renames `EmbeddableMappingType`

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
  - share `#finishInit` handling for `EmbeddableMappingType`, `VirtualIdEmbeddable` and `IdClassEmbeddable`
2021-12-01 11:33:02 -06:00
Steve Ebersole 524b46b246 Introduce `VirtualIdEmbeddable` and `IdClassEmbeddable`
This initial commit is scaled back - it only introduces the embeddable forms and supporting changes.

Still need to
  - integrate EmbeddableInstantiator work
  - integrate embedded forms.  `VirtualIdEmbeddable` does not really need it as it can use the id-mapping itself as the embedded form.  But `IdClassEmbedded` should really be integrated
  - integrate `VirtualKeyEmbeddable` and `VirtualKeyEmbedded` for use as inverse composite fks
2021-12-01 11:33:02 -06:00
Sanne Grinovero 25d8fda12c Improve reliability of ProposedGeneratedTests 2021-12-01 15:53:28 +00:00
Andrea Boriero 46857f456a Fix SimpleNaturalIdLoader#resolveIdToNaturalId() 2021-12-01 13:17:09 +01:00
Andrea Boriero df0479951c Fix o.h.Interceptor#onSave call 2021-12-01 13:16:37 +01:00
Andrea Boriero b4cfe7e54a Fix readOnly value and Query#scroll() 2021-11-29 13:57:26 +01:00
Andrea Boriero 0fbfc30eaa Fix refresh of a Proxy instance 2021-11-29 13:57:26 +01:00
Chris Cranford 9124fd84b4 Fix HBM joined-subclass key order by sorting 2021-11-27 02:36:29 -05:00
Andrea Boriero f83fb54614 Fix TypeDefinitionBinder registering TypeDefinition 2021-11-26 14:49:38 +01:00
Andrea Boriero 1f541170c7 Re-enable additional tests 2021-11-26 10:08:14 +01:00
Andrea Boriero 0e1822e5dd Re-enabled additional tests 2021-11-26 10:08:14 +01:00
Andrea Boriero e7992a35d4 Re-enable additional tests 2021-11-26 10:08:14 +01:00
Jan Schatteman ce6850bdfa Remove 'statementInspectorClass' from @Jpa and refactor its usage to use
a @SettingProvider

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2021-11-25 18:42:32 +01:00
Andrea Boriero cc43aaefb9 Re-enable additional tests 2021-11-25 14:03:04 +01:00
Andrea Boriero 492d391e73 Re-enable additional tests 2021-11-25 14:03:04 +01:00
Andrea Boriero 9766b05eba Re-enable additional tests 2021-11-25 14:03:04 +01:00
Andrea Boriero 36fa3fca8e Re-enabled stream tests 2021-11-25 14:03:04 +01:00
Andrea Boriero acd78256eb Fix statistics for native query 2021-11-25 14:03:04 +01:00
Andrea Boriero 92e8436014 Re-enable additional tests 2021-11-25 14:03:04 +01:00
Andrea Boriero 7f574f4a2a Merge branch 'wip/6.0_merge' into wip/6.0 2021-11-25 09:54:48 +01:00
Christian Beikov cbcec73d4f * Handle quoted identifiers in HQL and the Ordering parser
* Switch from the "expression" to "expressionOrPredicate" rule in the HQL grammar where it makes sense as required by some HQL tests
* Cleanup parser rule ordering to allow more keywords in the identifier rule
* Implement literal support for Ordering parser
* Add special AvgFunction as needed by H2, HSQL, DB2, SQL Server and Sybase that casts arguments to double if necessary
* Fix wrong deduplication of order by fragments in case a plural attribute is fetched multiple times
* Implement support for de-referencing any-valued mappings in HQL
* Avoid unnecessary entity subtypes in polymorphic splitted queries if a base type also matches the requested type
* Implement pagination support for polymorphic splitted queries
* Cleanup path part resolving by removing lots of duplicate code
* Aligh HQL parsing expectations to the expected behavior of 5.x
* Add method to `JavaType` that allows determining if a type is can be widened to another which is used for arithmetic type resolving
* Implement validations for fetch owner checking
* Fix issues with the id table creation due to lacking column lengths in the column DDL type
* Fix issues and add some optimizations related to multi-table delete handling
* Add the notion of a special "implicit" alias to avoid generating a unique alias for unaliased or implicit HQL joins
* Properly implement multiple bag fetch validation
* Make sure filter predicates are applied for all plural attribute joins
* Fix some issues with undecidable parameter type inference
* Fix some issues with negated SQM predicates not being converted to the proper SQL AST predicates
* Fix issues with qualifying DML target referencing columns
* Fix `is null` semantics for tuples referring to embeddable types
* Capture necessary details from JdbcValuesMetadata in the cached data to avoid executing a query on cache hit when types should be inferred
* Get rid of special CollectionPropertyNames and writeup a migration guide section for the replacements
2021-11-25 08:51:51 +01:00
Andrea Boriero bdc1e4103d Merge remote-tracking branch 'upstream/main' into wip/6.0_merge 2021-11-24 16:48:43 +01:00
Andrea Boriero d21db9e807 Fix loading OnetoOne self referencing entity 2021-11-24 16:35:23 +01:00
Marius Klein f604e8fa33 HHH-14937 SybaseASE15 supports schemas and catalogs 2021-11-23 11:28:01 +01:00
Christian Beikov eaea919cf5 Fix HBM based model binding wrt id-classes and move the last derived id tests 2021-11-19 16:29:56 +01:00
Christian Beikov b8429bca42 Introduce a proper EmbeddableMappingType for id-class and handle id-class uses uniformly 2021-11-19 16:29:56 +01:00
Andrea Boriero 971f58e335 Expose virtual id types in JPA metamodel 2021-11-19 16:29:56 +01:00
Andrea Boriero 57f7e59e14 Fix SqlResultSetMappingDescriptor generating ResultMemento for Embeddable attributes 2021-11-19 16:29:56 +01:00
Andrea Boriero a771d035c9 Fix null embeddable with circular reference 2021-11-19 16:29:56 +01:00
Andrea Boriero b520752c8d Fix issue with class used as IdClass and also embedded in another IdClass 2021-11-19 16:29:56 +01:00
Andrea Boriero 07a314b663 Fix EmbeddableMappingType trowing exception wehen the attributeMapping is an instance of EmbeddedAttributeMapping 2021-11-19 16:29:56 +01:00
Andrea Boriero 55b1ec48f1 Fix MappingModelCreationHelper#interpretToOneKeyDescriptor() throwing NotYetImplementedFor6Exception for NonAggregateIdentifier 2021-11-19 16:29:56 +01:00
Andrea Boriero d33200b309 Fix using wrong vale mapping for paramter binging with EntityCollectionPart 2021-11-19 16:29:56 +01:00
Andrea Boriero 411355852a Fix PersistenceUnitUtilImpl#getIdentifier() throws NPE for NonAggregateIdentifier 2021-11-19 16:29:56 +01:00
Andrea Boriero eae9a39b14 Fix throw exception when an Entity has an EmbeddedId being also an IdClass of another Entity 2021-11-19 16:29:56 +01:00
Andrea Boriero 9d08be53a6 Fix load NonAggregateIdentifier by id 2021-11-19 16:29:56 +01:00
Jan Schatteman 69d2c65880
Removal @Deprecated from availablesettings (#4369)
* Remove deprecated *_CLASSLOADER from AvailableSettings

Signed-off-by: Jan Schatteman <jschatte@redhat.com>

* Remove deprecated HBM2DLL_CREATE_NAMESPACES and DEPRECATED_EXTRA_PHYSICAL_TABLE_TYPES from AvailableSettings

Signed-off-by: Jan Schatteman <jschatte@redhat.com>

* Remove deprecated and duplicated HBM2DDL_DB_NAME, HBM2DDL_DB_VERSION, HBM2DDL_DB_MAJOR_VERSION, HBM2DDL_DB_MINOR_VERSION from AvailableSettings

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2021-11-17 14:52:52 +01:00
Andrea Boriero 8c5adc86d0 Merge remote-tracking branch 'upstream/main' into wip/6.0_merge_main_1 2021-11-16 17:23:06 +01:00
Sanne Grinovero 1dc49271c1 HHH-14540 Maintain strict API backwards compatibility 2021-11-16 15:32:05 +00:00
Chris Cranford e155fc551e HHH-14540 Don't share session-scoped interceptors with temp session 2021-11-16 15:27:51 +00:00
Andrea Boriero 8e8cccfa70 Re-enable additional tests 2021-11-16 13:51:26 +01:00
Andrea Boriero 8042cc2cdb Implemented BasicValue#accept method 2021-11-16 13:51:26 +01:00
Andrea Boriero 115234e70e Fix lazy toOne mappedby proxy generation 2021-11-16 13:51:26 +01:00
Andrea Boriero c1e16b4e4a Re-enabled additional tests 2021-11-16 13:51:26 +01:00
Jan Schatteman 37703e2e4c
Remove deprecated properties from AvailableSettings (#4362)
* Remove deprecated ACQUIRE_CONNECTIONS and RELEASE_CONNECTIONS from AvailableSettings

Signed-off-by: Jan Schatteman <jschatte@redhat.com>

* Remove deprecated PROXOOL_PREFIX and PREFER_POOLED_VALUES_LO from AvailableSettings

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2021-11-15 23:03:16 +01:00
Christian Beikov 3e97b1c205 Unify parameter type resolving 2021-11-15 16:17:11 +01:00
Karel Maesen f967e16fee HHH-14925 Using JavaTypeRegistry#findDescriptor() 2021-11-15 16:17:11 +01:00
Karel Maesen fa48448f77 HHH-14925 Fix type resolution in SqmCriteriaNodeBuilder 2021-11-15 16:17:11 +01:00
Karel Maesen 5a7ad6d11c HHH-14925 Add additional unit tests. 2021-11-15 16:17:11 +01:00
Fabio Massimo Ercoli a7167e2a48 Allow fetching nested unique keys 2021-11-15 14:36:34 +01:00
Fabio Massimo Ercoli e10eaf3ef4 Test query entity with mapped by embedded 2021-11-15 14:36:34 +01:00
Andrea Boriero 7dab08448f Re-enable additional tests 2021-11-15 14:00:52 +01:00
Andrea Boriero 1b879a65f0 Merge remote-tracking branch 'upstream/main' into wip/6.0_merge 2021-11-15 13:52:08 +01:00
Ratul sharker b125d13ede HHH-14916 : test case written. 2021-11-15 13:43:37 +01:00
Ratul sharker 1a641695fa HHH-14916 : inside `renderFetches`, `renderJoins` called if the `fetch` is `instanceof` `Form` interface. 2021-11-15 13:43:37 +01:00
Steve Ebersole 7b1201d542 Some pre-work for embeddable instantiator work. 2021-11-12 11:56:50 -06:00
Jan Schatteman db12d5a17a Remove deprecated JPA_METAMODEL_GENERATION and JPA_METAMODEL_POPULATION from AvailableSettings
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2021-11-12 14:57:52 +01:00
Christian Beikov 60a3c08563 Downgrade H2 to 1.4.197 for testing and to allow usage of H2GIS 2021-11-12 12:09:49 +01:00
Steve Ebersole 3f7536a94e The JPA TCK tests expect very specific things regarding a negated predicate node. 2021-11-11 18:03:28 -06:00
Steve Ebersole 7ce1c673ff JpaCompliance improvement 2021-11-11 17:03:40 -06:00
Christian Beikov 6c816932ed Fix generated values fetching for component attributes and implement identity select for Oracle 2021-11-11 15:49:30 +01:00
Christian Beikov 9a329f4991 Various fixes and move tests from test.jpa
* Remodel `@MapKey` support to not create subqueries in the on-clause anymore
* Make sure the index table group is reused for the to-one association a `@MapKey` refers to
* Consistently register collection part table groups
* Implement support for FK optimization for EntityCollectionPart
2021-11-11 15:49:30 +01:00
Christian Beikov 38d1c122eb Various fixes and move tests from test.jpa
* Implement parameter list expansion for native queries
* Fix empty subselect fetched collection initialization
* Implement support for nested table group joins to allow joins on the map-key
* Replace `getTableReference` with `resolveTableReference` where appropriate to distinguish which calls can cause table reference joins to be created
* Fix some table reference resolving issues with inverse embeddable model parts
* Use a Fetch for entity ids instead of a DomainResult
* Fix bidirectional fetching for collection initializtion
* Implement table reference join pruning for treat usages
* Implement strict JPA compliance for different parameter styles
* Ensure From nodes in Criteria are unique
* Add unique key support to DelayedEntityFetch
* Check if FetchParent is enhanced for lazy loading for DelayedEntityFetch
* Register entity instances under all possible EntityUniqueKey
* Introduce EntityJavaTypeDescriptor that implements equality based on object identity
2021-11-11 15:49:30 +01:00
Christian Beikov 24c758c2e9 Do not alter the join type anymore for non-real table groups that have table reference joins. Handle nullable key tables for to-ones properly and implement bidirectional one-to-one fetching optimization 2021-11-11 15:49:30 +01:00
Jan Schatteman 723735ca76 Use org.hibernate.testing.orm.junit.RequiresDialect instead of org.hibernate.testing.RequiresDialect and indicate Dialect version where needed.
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2021-11-10 22:53:29 +01:00
Jan Schatteman c4401452dd Enable a SettingProvider[] in @Jpa and refactor away the NonStringValueSettingProvider class
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2021-11-10 22:53:29 +01:00
Steve Ebersole f935d2b8e1 HHH-14923 - Allow CriteriaQuery to determine its "return type" as part of setting the selection 2021-11-10 09:12:53 -06:00
Jan Schatteman 2d38df66fd Updated test to JUnit5 to remove reference to Dialect subclass
Moved it back for now to the old location, since it fails with a
non-related error that will have to be looked at as soon as there is an
implementation for composite sub-types

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2021-11-10 08:37:29 +01:00
Steve Ebersole 599b0ba39f HHH-14919 - Improve handling for java.sql.Date, Time and Timestamp 2021-11-09 07:18:09 -06:00
Andrea Boriero 9c9a326ae6 Fix Dialect#BatchLoadSizingStrategy#determineOptimalBatchLoadSize taking into account org.hibernate.cfg.AvailableSettings#IN_CLAUSE_PARAMETER_PADDING 2021-11-09 12:16:41 +01:00
Andrea Boriero 53ad8d36e2 HHH-14876 Fix BatchLoadSizingStrategy#determineOptimalBatchLoadSize() 2021-11-09 12:16:41 +01:00
Andrea Boriero f9d0b7d069 HHH-14876 Parameter padding for IN clauses doesn't work in Hibernate 6.0.0.Beta1 2021-11-09 12:16:41 +01:00
Andrea Boriero 3f6a782760 Fix ScrollableCollectionFetchingTest Hana db failures 2021-11-09 12:12:43 +01:00
Andrea Boriero e9a933fe68 Merge remote-tracking branch 'upstream/main' into wip/6.0_merge 2021-11-09 10:50:16 +01:00
Yoann Rodière 2e1f7b5d89 HHH-14918 Test entity with composite ID containing an association to another entity which itself has a composite ID containing an association to another entity 2021-11-08 16:52:09 +01:00
Yoann Rodière ccd58ee499 HHH-14918 Always process components containing an ID copy as we would any other FK 2021-11-08 16:52:09 +01:00
Steve Ebersole 0eee5ff5b0 HHH-14905 - Verify that custom JavaType and JdbcType registration combo works 2021-11-05 10:35:21 -05:00
Steve Ebersole 9fec060fe2 HHH-14914 - Passing an ExtendedBeanManager which is never notified leads to runtime errors 2021-11-04 15:49:11 -05:00
Steve Ebersole 0ea110aea2 HHH-14913 - sub-query modifiers are ignored 2021-11-04 14:53:38 -05:00
Andrea Boriero b70487546e Code refactoring 2021-11-04 19:43:04 +01:00
Steve Ebersole 0b46966096 HHH-14905 - Verify that custom JavaType and JdbcType registration combo works 2021-11-04 13:11:33 -05:00
Steve Ebersole 31eb3b82c5 HHH-14905 - Verify that custom JavaType and JdbcType registration combo works 2021-11-04 13:11:33 -05:00
Steve Ebersole 34cdd3077c HHH-14905 - Verify that custom JavaType and JdbcType registration combo works 2021-11-04 13:11:33 -05:00
Andrea Boriero e28d61330e Derby dialect supportsResultSetPositionQueryMethodsOnForwardOnlyCursor should return false 2021-11-04 12:39:29 -05:00
Andrea Boriero 0facaf5632 Re-enable additional scrollable fetch test 2021-11-04 12:39:29 -05:00
Andrea Boriero 9b569932d2 Fix DynamicBatch loading 2021-11-04 12:39:29 -05:00
Andrea Boriero 29e22c68ac Fix SingleIdEntityLoaderDynamicBatch#load() method 2021-11-04 12:39:29 -05:00
Andrea Boriero 696eea9bbe Fix lazy loading of lazy basic attributes when an entity is fetched 2021-11-04 12:39:29 -05:00
Andrea Boriero 3dedb22365 Implement FetchingScrollableResultsImpl 2021-11-04 12:39:29 -05:00
Andrea Boriero 9d8fbfb727 Bytecode enhamcement fix unnecessary query for an optional OneToOne 2021-11-04 12:39:29 -05:00
Fabio Massimo Ercoli 47605bf93b Navigate all possible targetKeyPropertyNames 2021-11-02 16:28:27 +01:00
Fabio Massimo Ercoli fdcb07420f Defer the extraction of the sub part
When the foreign key is set to the to-one attribute, this is necessary to have an entity identity mapping using the foreign key SQL attributes
2021-11-02 16:28:27 +01:00
Fabio Massimo Ercoli de0dffe105 Allow ast navigation embedded > to-one 2021-11-02 16:28:27 +01:00
Fabio Massimo Ercoli 4e216a121c Test embedded > to-one | embedded 2021-11-02 16:28:27 +01:00
Sanne Grinovero 6c53a9d1ab HHH-14903 The new getConfiguredJdbcBatchSize method optimisation should apply to StatelessSession as well 2021-11-01 10:28:11 +00:00
Karel Maesen eef65b5bc2 Resolve to SqlTypes.GEOMETRY for Postgresql/CockroachDB 2021-10-31 14:52:00 +01:00
Steve Ebersole 46877fdcb4 HHH-14902 - JpaCompliantLifecycleStrategy$BeanImpl#initialize causes a deployment failure due to CDI Bean Manager not being available 2021-10-29 15:21:42 -05:00
Andrea Boriero 98a00ea9a1 Fix java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: Year when calling JdbcDateJavaTypeDescriptor#toString() 2021-10-29 11:42:42 +02:00
Andrea Boriero 47593f6412 Merge remote-tracking branch 'upstream/main' into wip/6.0_merge 2021-10-28 14:18:32 +02:00
Sanne Grinovero a2cbe10e07 HHH-14901 Refactor shared code into a single reused method 2021-10-27 11:58:10 +01:00
Sanne Grinovero cc7498cf3c HHH-14901 Introduce a new BatchBuilder implementation, suitable for immutable code deployments 2021-10-27 11:58:10 +01:00
Sanne Grinovero 7f71dca1ae HHH-14899 StaleObjectStateExceptionHandlingTest should expect a StaleStateException 2021-10-26 16:34:24 +01:00
Sanne Grinovero 634c257d93 HHH-14899 Rename test class to fix typo: StateObjectStateExceptionHandlingTest to StaleObjectStateExceptionHandlingTest 2021-10-26 16:34:24 +01:00
Sanne Grinovero 7ff73d178f HHH-14899 Inconsistent default value for STATEMENT_BATCH_SIZE 2021-10-26 16:34:24 +01:00
Sanne Grinovero 959dfea66f HHH-14899 Have SessionImpl override the default method getConfiguredJdbcBatchSize 2021-10-26 16:34:24 +01:00
Sanne Grinovero 5ad60c4b61 HHH-14900 No need in tests to shadow the jdbcBatchSize field of BatchBuilderImpl extensions 2021-10-26 16:34:24 +01:00
Sanne Grinovero aba67cfe6e HHH-14900 BatchBuilderImpl doesn't need to be Configurable 2021-10-26 16:34:24 +01:00
Sanne Grinovero 9ecd1799a0 HHH-14900 Since the BatchBuilderImpl Service is shared, mutable field jdbcBatchSize should be marked volatile 2021-10-26 16:34:24 +01:00
Sanne Grinovero 8a2869a09a HHH-14900 Remove dead logger 2021-10-26 16:34:24 +01:00
Steve Ebersole 0925e48ebf more user-guide basic-type chapter work;
renamed `JavaTypeDescriptorRegistry` to `JavaTypeRegistry`;
renamed `JdbcTypeDescriptorRegistry` to `JdbcTypeRegistry`
2021-10-25 13:55:53 -05:00
Andrea Boriero e588245f73 Fix checkstyle error 2021-10-25 18:09:54 +02:00
Andrea Boriero 5d62eac4b9 Merge remote-tracking branch 'upstream/main' into wip/6.0_merge 2021-10-25 18:05:46 +02:00
Andrea Boriero 67c2c51d47 Re-enabled additional tests 2021-10-25 15:57:39 +02:00
Christian Beikov 6745f71f88 Add support for from-space wide explicit join ordering and thus support entity/cross joins on all JpaFrom elements 2021-10-25 09:15:25 +02:00
Christian Beikov 1456a2dd7f Render implicit joins as nested table group joins instead of sub queries 2021-10-25 09:15:25 +02:00
Christian Beikov 756afb8788 Fix collection table cleanup issues for all strategies 2021-10-25 09:15:25 +02:00
Christian Beikov fa3101c29e Fix join predicate rendering and fix support for implicit joins in the ON clause 2021-10-25 09:15:25 +02:00
Jan Schatteman 8fc0e05930 Re-enable WithClauseTest
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
2021-10-25 09:15:25 +02:00
Steve Ebersole a3c36af5c6 HHH-14877 - FetchMode.SUBSELECT ignored
- cleanup
2021-10-21 16:47:21 -05:00
Steve Ebersole aef0775946 HHH-14877 - FetchMode.SUBSELECT ignored
- fixed additional tests
2021-10-21 16:47:21 -05:00
Steve Ebersole 96c0b04658 HHH-14877 - FetchMode.SUBSELECT ignored
- fixed Oracle errors related to follow-on locking
2021-10-21 16:47:20 -05:00
Steve Ebersole 653de50aa5 HHH-14877 - FetchMode.SUBSELECT ignored
Worked on FetchMode.SUBSELECT support but also worked on a few general collection fetch issues and a few improvements
2021-10-21 16:47:20 -05:00
Steve Ebersole aca86036d3 HHH-14877 - FetchMode.SUBSELECT ignored
Worked on FetchMode.SUBSELECT support but also worked on a few general collection fetch issues and a few improvements
2021-10-21 16:47:20 -05:00
Steve Ebersole db70fd38dd HHH-14877 - FetchMode.SUBSELECT ignored
Worked on FetchMode.SUBSELECT support but also worked on a few general collection fetch issues and a few improvements
2021-10-21 16:47:20 -05:00
Steve Ebersole e8e62c4d6c HHH-14877 - FetchMode.SUBSELECT ignored 2021-10-21 16:47:20 -05:00
Steve Ebersole b5558307a9 Clean up various legacy "read path" contracts
- clean-up unused Type methods
    * Type#nullSafeGet
    * Type#hydrate
    * Type#resolve
    * Type#getSemiResolvedType
    * Type#semiResolve
    * related
- start removing usage of Tuplizer
- start removing usage of legacy Tuplizer-based Instantiator
- drop `EntityMode` completely
- preliminary clean-up of EntityTuplizer
- preliminary clean-up of ComponentTuplizer
2021-10-21 16:26:50 -05:00
Steve Ebersole c34ea34f6b Clean up various legacy "read path" contracts
- clean-up unused Type methods
    * Type#nullSafeGet
    * Type#hydrate
    * Type#resolve
    * Type#getSemiResolvedType
    * Type#semiResolve
    * related
- start removing usage of Tuplizer
- start removing usage of legacy Tuplizer-based Instantiator
- Drop `EntityMode` completely
2021-10-21 16:26:49 -05:00
Steve Ebersole d2530df5ac Clean up various legacy "read path" contracts
- clean-up unused Type methods
    * Type#nullSafeGet
    * Type#hydrate
    * Type#resolve
    * Type#getSemiResolvedType
    * Type#semiResolve
    * related
- start removing usage of Tuplizer
- start removing usage of legacy Tuplizer-based Instantiator
2021-10-21 16:26:49 -05:00
Steve Ebersole 3efaec2cff Clean up various legacy "read path" contracts
- clean-up unused Type methods
    * Type#nullSafeGet
    * Type#hydrate
    * Type#resolve
    * Type#getSemiResolvedType
    * Type#semiResolve
    * related
- start removing usage of Tuplizer
- start removing usage of legacy Tuplizer-based Instantiator
2021-10-21 16:26:49 -05:00
Steve Ebersole 62f761732d Clean up various legacy "read path" contracts
- clean-up unused Type methods
    * Type#nullSafeGet
    * Type#hydrate
    * Type#resolve
    * Type#getSemiResolvedType
    * Type#semiResolve
    * related
- start removing usage of Tuplizer
- start removing usage of legacy Tuplizer-based Instantiator
2021-10-21 16:26:49 -05:00
Steve Ebersole cf36d17fac Clean up various legacy "read path" contracts
* Type#nullSafeGet
* Type#hydrate
* Type#resolve
* Type#getSemiResolvedType
* Type#semiResolve
* related
2021-10-21 16:26:49 -05:00
Steve Ebersole 91e29358be HHH-14857 - Deprecations in preparation for 6 2021-10-21 16:13:55 -05:00
Steve Ebersole e4b56b9271 HHH-14857 - Deprecations in preparation for 6 2021-10-21 13:52:33 -05:00
Steve Ebersole 54ea27a4d5 improve hibernate-core-jakarta build 2021-10-21 12:25:49 -05:00
Christian Beikov 3d27f61221 Fix non-deterministic time based test 2021-10-20 16:19:22 +02:00
bb7133 ae8bedfa6d update wrong SkipForDialect 2021-10-20 16:19:22 +02:00
bb7133 5bd27eb853 HHH-14576 : Introduce the dialect for TiDB 2021-10-20 16:19:22 +02:00
Fabio Massimo Ercoli 00aa4addec HHH-14890 Add javadoc for interpretToOneKeyDescriptor(s) 2021-10-20 15:54:25 +02:00
Fabio Massimo Ercoli 70a19bae68 HHH-14890 Interpret nested ToOne key descriptor 2021-10-20 15:54:25 +02:00
Fabio Massimo Ercoli 1f3f3e2639 HHH-14890 Test mapped by on embeddable 2021-10-20 15:54:25 +02:00
Christian Beikov 98de63d0a1 Handle keywords initialization for dialects through DialectResolutionInfo and un-deprecate Dialect#getKeywords 2021-10-20 15:02:48 +02:00
Christian Beikov ae9d99a32c Handle the fact that PostgreSQL uses a backslash as default escape character in the like predicate 2021-10-20 15:02:48 +02:00
Higor Tavares 2f52c8024c remove the commented code 2021-10-20 10:37:14 +02:00
Andrea Boriero 9c2c7e13dd HHH-14875 Slow query log seems to be missing in Hibernate 6.0.0.Beta1 2021-10-19 17:30:54 +02:00
Andrea Boriero dd36e349b1 Merge branch 'wip/6.0_merge' into wip/6.0 2021-10-19 16:36:48 +02:00
Christian Beikov a4e406a54e * Add SqlTypes as analogy to java.sql.Types containing constants for Hibernate specified types
* Add FormatMapper for a pluggable JSON serialization and deserialization strategy
* Add native UUID type support for H2, Cockroach, PostgreSQL
* Add native INET type support for Cockroach, PostgreSQL
* Add native JSON type support for MySQL, Cockroach, PostgreSQL
* Add native INTERVAL SECOND type support for H2, Cockroach, PostgreSQL
* Add fallback JdbcTypes for new SqlTypes
* Register column types for new SqlTypes
* Add support for BasicTypeReference in TypedParameterValue
* Fix a lot of method signatures with respect to type parameter issues
* Fix CustomType, UserType and EnhancedUserType with respect to type parameters
* Get rid of StringRepresentableType and some other unused deprecated methods
2021-10-19 16:33:36 +02:00
Christian Beikov 541302a511 Get rid of most basic type subclasses 2021-10-19 16:33:36 +02:00
Christian Beikov 4f861e13ba Properly handle SQLFunction registrations 2021-10-19 16:33:36 +02:00
Andrea Boriero 7f46f11f3b Merge remote-tracking branch 'upstream/main' into wip/6.0_merge 2021-10-19 16:23:07 +02:00
Andrea Boriero 6ddf3530fa EntityValuedFetchable add isOptional and isUnwrapproxy methods 2021-10-19 13:13:47 +02:00
Andrea Boriero 6ffcee44a6 search second level cache if proxy entity metamodel has subclasses 2021-10-19 13:13:47 +02:00
Andrea Boriero 1ffa1347a3 Rename ToOneAttributeMapping isInternalLoadNullable to isOptional 2021-10-19 13:13:47 +02:00
Andrea Boriero f02ffde061 Re-enabled additional tets 2021-10-19 13:13:47 +02:00
Andrea Boriero ad5326a8ce Re-enabled additional tests 2021-10-19 13:13:47 +02:00
Andrea Boriero 73452ae61f Fix ToOne with Ignore not found lazy loading 2021-10-19 13:13:47 +02:00
Andrea Boriero d95dad597c Re-enabled additional tests 2021-10-19 13:13:47 +02:00
Andrea Boriero 449d4adc27 Fix cascade loader not join associations after first collection 2021-10-19 13:13:47 +02:00
Andrea Boriero 57e2d25dd3 Re-enabled additional tests 2021-10-19 13:13:47 +02:00
Andrea Boriero dcab4bf7bf Fix unfetched collection assembling 2021-10-19 13:13:47 +02:00
Andrea Boriero d616f2aa55 Fix ToOneAttributeMapping tableGroup creation 2021-10-19 13:13:47 +02:00
Andrea Boriero fa694c5d41 Re-enabled additional tests 2021-10-19 13:13:47 +02:00
Andrea Boriero 563ee45530 Fix delayed entity fetch loading trying to instantiate abstract class 2021-10-19 13:13:47 +02:00
Andrea Boriero 7eccda9f36 Fix java.lang.ClassCastException: org.hibernate.internal.StatelessSessionImpl cannot be cast to org.hibernate.event.spi.EventSource 2021-10-19 13:13:47 +02:00
Christian Beikov a3920e5892 Small test fixes. Fix unwraps and mutation strategy configuration 2021-10-19 11:12:26 +02:00
Sanne Grinovero 9dd6cd06c9 HHH-14882 StandardStack needs to support null entries 2021-10-18 13:11:46 +01:00
Sanne Grinovero ef3fe11ae6 HHH-14882 Minor implementation optimisations in internal StandardStack
The current StandardStack implementation is based on a LinkedList, which is well known to be a suboptimal choice; this should be switched to a lazily allocated ArrayDeque.
2021-10-18 13:11:46 +01:00
Sanne Grinovero 6008264711 HHH-14816 Optimise LockMode#fromExternalForm for common case 2021-10-18 12:19:44 +01:00
Sanne Grinovero 3bee3a1c79 HHH-14816 Minor refactoring of LockModeTypeHelper conversions 2021-10-18 12:19:44 +01:00
Dariush Moshiri 8e0f0b4123 HHH-14816 Can not set lock mode with QueryHint due to type case problem 2021-10-18 12:19:44 +01:00