PropertyAccessStrategy specified via @AttributeAccessor not honoured

Description

A custom PropertyAccessStrategy specified via the @AttributeAccessor annotation is not honoured. This used to work fine with a custom PropertyAccessor via the @AccessType annotation in earlier hibernate versions. It appears the deprecation of @AccessType in favour of @AttributeAccessor and corresponding conversion from PropertyAccessor to PropertyAccessStrategy has left something broken.

The PropertyAccessStrategyBasicImpl is being used instead of the one specified by @AttributeAccessor.

Environment

WildFly 10.1.0.Final.

Activity

Show:
James Olsen
June 2, 2017, 3:50 AM

I won't prepare a Test Case as I'm pretty sure this feature will never be supported. It was broken a long time ago, even with the old annotation (https://hibernate.atlassian.net/browse/HCANN-48).

However, there is a workaround for anyone who needs custom property getters and setters that seems to be fully supported. A custom PojoEntityTuplizer and @Tuplizer annotation will do the job.

So I think the solution is to deprecate @AttributeAccessor and update the docs to state that it performs no function (to save people from spending days trying to get it to work) and point them towards PojoEntityTuplizer and @Tuplizer.

Steve Ebersole
June 2, 2017, 2:05 PM

Closed per reporter request

Assignee

Unassigned

Reporter

James Olsen

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

3.2.5

Components

Affects versions

Priority

Minor
Configure