mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#291 - ENH: Add ability to validate a query or property expression - Was Please check column exist on entity
This commit is contained in:
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.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user