Raise warning in case mapping annotations are ignored due to default access type

Description

Raise a warning or error in cases where mapping annotations are given on an element not matching the default access type for that entity and @Access has not been given explicitly either.

The most common case of this issue which I saw several times happen is where @Id is given at the field level but some other mapping annotations are given on property getters. The latter are silently ignored in that case, resulting in mapping errors tough to understand especially for beginners. A warning might help them.

Discussion on hibernate-dev: http://lists.jboss.org/pipermail/hibernate-dev/2016-January/014023.html

Activity

Show:

Steve Ebersole January 13, 2016 at 2:10 PM

May have already been covered under the work I have done for and friends as pushed to my fork : https://github.com/sebersole/hibernate-core/commits/jandex-binding

Details

Assignee

Reporter

Fix versions

Priority

Created January 13, 2016 at 8:45 AM
Updated January 13, 2016 at 2:10 PM