Problem using custom PropertyAccessor implementation with annotations

50 views Asked by At

I've a custom implementation of PropertyAccessor that only works if I declare it in the XML mapping file, but not when using field annotations in POJOs).

I try the following:

  • With hibernate-core (4.2), XML works but annotation @AccessType doesn't.
  • With hibernate-core (4.3), XML not tested, annotation @AttributeAccessor doesn't work, same problem
  • Use @ColumnTransformer and @Formula instead, but I've not found a formula or a function that suits my needs.

I expect @AccessType=("my.custom.property.accessor") or @AttributeAccessor("my.custom.property.accessor") to work, but it seems that these annotations or actually their content are ignored.

As a precision, I use field access.

Any help will be really appreciated, I want to move to annotations instead of XML mapping files, and this issue is preventing me to do it.

Thanks in advance.

0

There are 0 answers