mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1634 ENH: Add convenience expressions "equal to or null" eqOrNull()
This commit is contained in:
@@ -162,6 +162,11 @@ public class DefaultExpressionFactory implements SpiExpressionFactory {
|
||||
return new SimpleExpression(propertyName, Op.EQ, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Expression eqOrNull(String propertyName, Object value) {
|
||||
return or(eq(propertyName, value), isNull(propertyName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Not Equal To - property not equal to the given value.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user