Annotation Interface DefaultListSemantics


@Target({PACKAGE,MODULE}) @Retention(RUNTIME) @Incubating(since="8.0") public @interface DefaultListSemantics

Specifies the default semantics of persistent List attributes without explicit collection classification or ordering metadata.

The annotation on the package declaring an attribute takes precedence over the annotation on its module. Package defaults do not apply to subpackages. Inherited attributes and attributes of embeddables use their declaring type's package and module, not those of the containing entity.

Explicit mapping metadata takes precedence over this default. In particular, in the absence of explicit list-index metadata, lists with OrderBy or SQLOrder, and unowned to-many associations, retain bag semantics.

In the absence of this annotation, the configured implicit list semantics apply, defaulting to DefaultListSemantics.Classification.BAG.

Since:
8.0