HHH-13156 - Enhance the @AnyMetaDef annotation section with more details about the optimal placement

This commit is contained in:
John Lin 2018-12-12 14:53:29 +08:00 committed by Vlad Mihalcea
parent 9ff14a33c7
commit 0d2fa6e94b
1 changed files with 2 additions and 3 deletions

View File

@ -542,8 +542,6 @@ The `property_id` is used to match the `id` column of either the `string_propert
while the `property_type` is used to match the `string_property` or the `integer_property` table. while the `property_type` is used to match the `string_property` or the `integer_property` table.
The table resolving mapping is defined by the `metaDef` attribute which references an `@AnyMetaDef` mapping. The table resolving mapping is defined by the `metaDef` attribute which references an `@AnyMetaDef` mapping.
Although the `@AnyMetaDef` mapping could be set right next to the `@Any` annotation,
it's good practice to reuse it, therefore it makes sense to configure it on a class or package-level basis.
The `package-info.java` contains the `@AnyMetaDef` mapping: The `package-info.java` contains the `@AnyMetaDef` mapping:
@ -558,7 +556,8 @@ include::{sourcedir}/any/package-info.java[tags=associations-any-meta-def-exampl
[NOTE] [NOTE]
==== ====
It is recommended to place the `@AnyMetaDef` mapping as a package metadata. Although the `@AnyMetaDef` mapping could be set right next to the `@Any` annotation,
if you need to reuse it, it's good practice to configure it at the class or package level.
==== ====
To see the `@Any` annotation in action, consider the next examples. To see the `@Any` annotation in action, consider the next examples.