-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: POJO
Currently, there isn't a nice way for users of the POJO persistence mechanism to prevent property models from automatically incorporating getXXX methods as properties. I'm suggesting the introduction of a FieldsOnlyConvention (or something similar) that will allow users of the Java driver to enforce methods are never used globally (rather than depend on developers correctly annotating every single method with @BsonIgnore)
For my company, this has been a source of bugs, data leakage, and data duplication. Potentially a security concern. But mostly data duplication. It's easy for a developer to add a "getXYZ" method that provides a new view of the underlying data (without realizing that the POJO will end up with lots of duplicated data when stored as a MongoDB document.
There is no great way for developers in user land to develop a solution for this (I've tried).
- duplicates
-
JAVA-3220 Protected and package private fields are not set by the SET_PRIVATE_FIELDS_CONVENTION
- Backlog