HHH-18728 - Allow mixed discriminator-value mappings for ANY

HHH-18729 - Allow custom strategy for implicit discriminator-value determination for ANY
This commit is contained in:
Steve Ebersole 2024-11-06 20:28:11 -07:00
parent 2ea226999d
commit 64c26fa5ab
1 changed files with 17 additions and 1 deletions

View File

@ -77,7 +77,7 @@ NOTE: The functions are incubating/tech-preview and to use them in HQL,
it is necessary to enable the `hibernate.query.hql.json_functions_enabled` and `hibernate.query.hql.xml_functions_enabled` configuration settings.
[[set-returning-functions]]
== Set-returning functions
== Set-returning Functions
A set-returning function is a new type of function that can return rows and is exclusive to the `from` clause.
The concept is known in many different database SQL dialects and is sometimes referred to as table valued function or table function.
@ -90,6 +90,22 @@ Out-of-the-box, some common set-returning functions are already supported or emu
* `json_table()` - turns a JSON document into rows
* `xmltable()` - turns an XML document into rows
[[any-discriminator]]
== @AnyDiscriminatorImplicitValues
The new `@AnyDiscriminatorImplicitValues` offers 2 related improvements for the mapping of discriminator values
for `@Any` and `ManyToAny` associations.
First, it allows control over how Hibernate determines the discriminator value to store in the database for
implicit discriminator mappings. Historically, Hibernate would always use the full name of the associated
entity.
Second, it allows mixing of explicit and implicit value strategies.
See the link:{user-guide-url}#associations-any[User Guide] for details.
[[cleanup]]
== Clean-up