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