Description
If a property is synthetic (e.g. has no backing field) and is annotated with @BsonIgnore then it shouldn't require a codec for the property.
import org.bson.codecs.pojo.annotations.BsonIgnore;
|
|
|
public class MyPojo {
|
private final String stringField;
|
|
MyPojo(final String stringField) {
|
this.stringField = stringField;
|
}
|
|
|
public String getStringField() {
|
return stringField;
|
}
|
|
|
@BsonIgnore
|
public Object getSyntheticProperty() {
|
return null;
|
}
|
}
|
With the above example there is no need for a Codec<Object>.
The ConventionAnnotationImpl needs updating, to handle for synthetic getters / setters.