[hibernate-dev] hiberate-commons-annotations and locating annotations
Steve Ebersole
steve at hibernate.org
Thu Aug 29 16:04:49 EDT 2013
So actually what happens is that the XProperty is from the superclass.
This goes back to SimpleValueBinder, and the attempt to hook
AttributeConverter resolution into that code. Specifically in
org.hibernate.cfg.annotations.SimpleValueBinder#setType when we are
passed the XProperty. Maybe this is not the correct place to tie in
this processing. Or maybe using the passed XProperty is not the
correct thing to do.
All I know is that given an XProperty, I cannot find annotations that
are specific to the class being mapped in SimpleValueBinder and given
PropertyHolder I cannot search composite paths.
On Thu 29 Aug 2013 02:57:05 PM CDT, Emmanuel Bernard wrote:
> On Thu 2013-08-29 14:22, Steve Ebersole wrote:
>> Given an XProperty, is there a way to ask for annotations which are
>> defined only locally on that declared property (not on any super classes)?
>
> I believe that is what XProperty will give you.
> The list of XProperty of a given XClass is computed from
> Class.getDeclaredMethod, so it does not look for superclass methods.
>
> Could it be that @Convert is marked @Inherited?
More information about the hibernate-dev
mailing list