Annotation Interface MongoEntity


@Retention(RUNTIME) @Target(TYPE) public @interface MongoEntity
This annotation can be used to specify some configuration of the mapping of an entity to MongoDB.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the MongoDB client (if not set the default client will be used).
    The name of the collection (if not set the name of the entity class will be used)
    The name of the database (if not set the default from the property quarkus.mongodb.database will be used).
    Configures the read preference for the collection of this entity.
  • Element Details

    • collection

      String collection
      The name of the collection (if not set the name of the entity class will be used)
      Default:
      ""
    • database

      String database
      The name of the database (if not set the default from the property quarkus.mongodb.database will be used).
      Default:
      ""
    • clientName

      String clientName
      The name of the MongoDB client (if not set the default client will be used).
      Default:
      ""
    • readPreference

      String readPreference
      Configures the read preference for the collection of this entity. Supported values are: primary|primaryPreferred|secondary|secondaryPreferred|nearest
      Default:
      ""