188.8.131.52. Metadata Building
The main source for metadata structure generation are annotated entity classes.
Entity class will be present in the metadata in the following cases:
Persistent entity class is annotated by
@MappedSuperclassand is located within the root package specified in metadata.xml.
Non-persistent entity class is annotated by
@MetaClassand is located within the root package specified in
All entities inside same root package are put into the same
MetaModel instance, which is given the name of this package. Entities within the same
MetaModel can contain arbitrary references to each other. References between entities from different meta-models can be created in the order of declaration of
metadata.xml files in cuba.metadataConfig property.
Entity attribute will be present in metadata if:
A class field is annotated by
A class field or an access method (getter) is annotated by
Metaclass and metaproperty parameters are determined on the base of the listed annotations parameters as well as field types and class methods. Besides, if an attribute does not have write access method (setter), it becomes immutable (read-only).