No effective change - Improve exception error message when property is not found on a bean type

Typically using IDE enhancement plugin with incremental compilation where part of an inheritance
hierarchy has been changed but not all related classes recompiled and re-enhanced.
This commit is contained in:
Rob Bygrave
2018-01-12 01:27:24 +13:00
parent 14105eb1eb
commit 82f5c21d26
@@ -1392,7 +1392,9 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
Integer pos = reflectProps.getPropertyIndex(propName);
if (pos == null) {
if (isPersistentField(prop)) {
throw new IllegalStateException("Property " + propName + " not found in " + reflectProps + " for type " + desc.getBeanType());
throw new IllegalStateException(
"If you are running in an IDE with enhancement plugin try a Build -> Rebuild Project to recompile and enhance all entity beans. " +
"Error - property " + propName + " not found in " + reflectProps + " for type " + desc.getBeanType());
}
} else {