@Documented
@Target(value={METHOD,FIELD,PARAMETER})
@Retention(value=RUNTIME)
public @interface BsonProperty
Note: Requires the Conventions.ANNOTATION_CONVENTION
Conventions.ANNOTATION_CONVENTION
Modifier and Type | Optional Element and Description |
---|---|
boolean |
useDiscriminator |
java.lang.String |
value
The name of the property.
|
public abstract java.lang.String value
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.
PropertyModel.getWriteName()
,
PropertyModel.getReadName()