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.

is followed up by

Activity

Steve EbersoleJune 2, 2017 at 2:05 PM

Closed per reporter request

James OlsenJune 2, 2017 at 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.

Incomplete

Details

Assignee

Reporter

Worked in

Affects versions

Priority

Created June 1, 2017 at 5:25 AM
Updated October 25, 2017 at 2:17 PM
Resolved June 2, 2017 at 2:05 PM

Flag notifications