We have a class that has the following methods:
public void setMemberAdministrator(Boolean isAdministrator) {
this.isMemberAdministrator = isAdministrator;
}
public Boolean isMemberAdministrator() {
return isMemberAdministrator;
}
The hbm.xml file says:
<property name="memberAdministrator" column="is_member_admin" />
IDEA shows an error saying "Cannot resolve attribute memberAdministrator". If I change the type to boolean (i.e. primitive), IDEA stops complaining. Also if I change the method from isMemberAdministrator() to getMemberAdministrator(), IDEA stops complaining.
I don't know if it bad practice to combine Boolean and the "is" form for getters, but at least Hibernate does not seem to mind, even though IDEA does. If it is indeed bad practice, IDEA should simply warn about it and not show it as an error.