此内容没有您所选择的语言版本。
16.3.2. Using return-property to Explicitly Specify Column/Alias Names
You can explicitly tell Hibernate what column aliases to use with
<return-property>
, instead of using the {}
-syntax to let Hibernate inject its own aliases.For example:
<return-property>
also works with multiple columns. This solves a limitation with the {}
-syntax which cannot allow fine grained control of multi-column properties.
In this example
<return-property>
was used in combination with the {}
-syntax for injection. This allows users to choose how they want to refer column and properties.
If your mapping has a discriminator you must use
<return-discriminator>
to specify the discriminator column.