Hi all,
My problem deals with persistent property access :
I've implemented my domain entities as dynamic proxies, so direct field access is not a solution for hibernate to update their state.
They also have behaviour (business rules) attached to setters whenever the set value actually changes the internal state (this behaviour is attached at run-time using some configuration). So the property access is not suitable since it would trigger the behaviour attached to the setter whenever the persistence layer access the property to technically update its state.
So I've created a generic technical mutator on my entities root class like setPropertyWithoutTriggerringBehaviour(String propertyName, Object value).
Using regular hibernate mapping files, it's just straightforward to implement and install a custom PropertyAccessor to use this mutator and it works like a charm.
Now, I want to migrate my code to annotation based configuration and the only options I have for state access is entity-wide (that's fine for me) and restricted to FIELD or PROPERTY (which comes from the JSR).
So I was wondering if there was any planned enhancement for using custom PropertyAccessor with annotations (presumably defining some hibernate specific extension) ?
Thanks and regards,
Vincent
_________________ Vince
|