DirectPropertyAccessor alternatives in 5.2.12


#1

Hi,

We used in Hibernate 4.1.9 DirectPropertyAccessor to implement custom access methods (getters and setters) for hibernate properties. How can we implement those custom methods in Hibernate 5.2.12 ?

Regards


#2

Depends how you indicated to use that access strategy. hbm.xml? Annotations? orm.xml? Ultimately DirectPropertyAccessor should be replaced with either org.hibernate.property.access.internal.PropertyAccessFieldImpl or org.hibernate.property.access.internal.PropertyAccessMixedImpl. Again, how to specify that switch depends on what mechanism you are using.


#3

We use hbm.xml files.


#4

Thanks. PropertyAccessFieldImpl is what we search.