Commit Graph

7552 Commits

Author SHA1 Message Date
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