3 Replies Latest reply: Aug 4, 2011 8:24 PM by John Ament
The OCM mapping currently works like this: Fields annotated with @JcrProperty are currently mapped to a node by invoking the getter for the field. Also, due to this, @JcrProperty is only defined for fields, and not methods.
This seems to go against the Java bean convention where a getter method without the matching field is also regarded to be a property. Why not allow @JcrProperty for methods as well, and either read the field or invoke the accessor method re get/set the property?
This would allow for a more flexible implementation of the value object, e.g. in my implementation I have reasons to store the field value in a map, and not in an object field.
|Retrieving data ...|