final FieldConstraintDescr fieldConstraintDescr,
final AbstractCompositeConstraint container) {
// it is a complex expression, so we need to turn it into an MVEL predicate
Dialect dialect = context.getDialect();
// switch to MVEL dialect
MVELDialect mvelDialect = (MVELDialect) context.getDialect( "mvel" );
boolean strictMode = mvelDialect.isStrictMode();
mvelDialect.setStrictMode( false );
context.setDialect( mvelDialect );
PredicateDescr predicateDescr = new PredicateDescr();
MVELDumper dumper = new MVELDumper();
predicateDescr.setContent( dumper.dump( fieldConstraintDescr ) );
build( context,
pattern,
predicateDescr,
container );
mvelDialect.setStrictMode( strictMode );
// fall back to original dialect
context.setDialect( dialect );
}