Package org.bson.codecs.pojo.annotations
Annotation Interface BsonRepresentation
@Documented
@Retention(RUNTIME)
@Target({FIELD,METHOD,PARAMETER})
public @interface BsonRepresentation
An annotation that specifies what type the property is stored as in the database.
For POJOs, requires the Conventions.ANNOTATION_CONVENTION
For Java records, the annotation is only supported on the record component.
For Kotlin data classes, the annotation is only supported on the constructor parameter.
- Since:
- 4.2
- See Also:
-
Required Element Summary
-
Element Details
-
value
BsonType valueThe type that the property is stored as in the database.- Returns:
- the type that the property should be stored as.
-