Commit Graph

7504 Commits

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