Annotation Interface MappedEntity


@Retention(RUNTIME) @Target({ANNOTATION_TYPE,TYPE,FIELD,METHOD}) @Documented @IndexedAnnotation(annotation=Id.class) @IndexedAnnotation(annotation=Version.class) @IndexedAnnotation(annotation=DateCreated.class) @IndexedAnnotation(annotation=DateUpdated.class) @IndexedAnnotation(annotation=MappedProperty.class,member="value") @IndexedAnnotation(annotation=Index.class,member="value") public @interface MappedEntity
Designates a class as being persisted. This is a generic annotation to identify a persistent type and is typically not used directly but rather mapped to.
Since:
1.0
Author:
graemerocher
  • Element Details

    • value

      String value
      The destination the type is persisted to. This could be the table name, document name, column name etc. or some external form.
      Returns:
      The destination
      Default:
      ""
    • namingStrategy

      @AliasFor(annotation=NamingStrategy.class, member="value") Class<? extends NamingStrategy> namingStrategy
      Returns:
      The naming strategy to use.
      Default:
      io.micronaut.data.model.naming.NamingStrategies.UnderScoreSeparatedLowerCase.class
    • escape

      boolean escape
      Returns:
      Whether to escape identifiers in generated queries. Defaults to true.
      Default:
      true
    • alias

      String alias
      Returns:
      The alias to use for the query
      Default:
      ""
    • schema

      String schema
      Only applies to supported databases.
      Returns:
      the schema to use for this query
      Since:
      3.9
      Default:
      ""