Annotation Type BsonProperty

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean useDiscriminator  
      java.lang.String value
      The name of the property.
    • Element Detail

      • value

        java.lang.String value
        The name of the property.

        For asymmetrical property names, the context of the BsonProperty can be important. For example, when used with @BsonCreator the value will relate to the read name. When used directly on a field it will set both the read name if unset and the write name if unset.

        Returns:
        the name to use for the property
        See Also:
        PropertyModel.getWriteName(), PropertyModel.getReadName()
        Default:
        ""
      • useDiscriminator

        boolean useDiscriminator
        Returns:
        whether to include a discriminator when serializing nested Pojos.
        Default:
        false