if (x.getOperator() == SQLBinaryOperator.Equality) {
if (x.getLeft() instanceof SQLIdentifierExpr && isSimpleValue(visitor, x.getRight())) {
visit(visitor, (SQLIdentifierExpr) x.getLeft());
x.getRight().accept(visitor);
Entity entity = (Entity) x.getLeft().getAttribute(MAPPING_ENTITY);
Property property = (Property) x.getLeft().getAttribute(MAPPING_PROPERTY);
Object value = x.getRight().getAttribute(MAPPING_VALUE);
PropertyValue propertyValue = new PropertyValue(entity, property, value);
propertyValue.putAttribute("mapping.expr", x.getRight());
visitor.getPropertyValues().add(propertyValue);
return false;
}
if (x.getLeft() instanceof SQLPropertyExpr && isSimpleValue(visitor, x.getRight())) {
visit(visitor, (SQLPropertyExpr) x.getLeft());
x.getRight().accept(visitor);
Entity entity = (Entity) x.getLeft().getAttribute(MAPPING_ENTITY);
Property property = (Property) x.getLeft().getAttribute(MAPPING_PROPERTY);
Object value = x.getRight().getAttribute(MAPPING_VALUE);
PropertyValue propertyValue = new PropertyValue(entity, property, value);
propertyValue.putAttribute("mapping.expr", x.getRight());