#291 - ENH: Add ability to validate a query or property expression - Was Please check column exist on entity

This commit is contained in:
Robin Bygrave committed 2015-11-30 15:10:22 +13:00
1 parent debd8ad617
commit fae39fe650
26 files changed
+245 -4

No files matched your search

@@ -1602,6 +1602,15 @@ public class BeanDescriptor<T> implements MetaBeanInfo, SpiBeanType<T> {
return new ElComparatorProperty<T>(elGetValue, sortProp.isAscending(), nullsHigh);
}
@Override
public boolean isValidExpression(String propertyName) {
try {
return (getElGetValue(propertyName) != null);
} catch (PersistenceException e) {
return false;
}
}
/**
* Get an Expression language Value object.
*/