1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.