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 |
|