[hibernate-dev] Issue a warning if field and getter annotation styles are mixed?
Gunnar Morling
gunnar at hibernate.org
Tue Jan 12 05:56:05 EST 2016
Hi,
Would it be feasible to 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
for those not super-deep into the details of access type retrieval. A
warning might help them.
Any thoughts?
--Gunnar
More information about the hibernate-dev
mailing list