if (keyMapping instanceof SerialisedMapping)
{
// Apply condition on join-table owner field to filter by owner
ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt,stmt.getMainTableExpression());
ScalarExpression keyVal = keyMapping.newLiteral(stmt, key).add(dba.getMapping(String.class, storeMgr).newLiteral(stmt,"%"));
stmt.andCondition(new BooleanExpression(keyExpr,ScalarExpression.OP_LIKE,keyVal), true);
}
else
{
// Apply condition on join-table owner field to filter by owner
ScalarExpression keyExpr = keyMapping.newScalarExpression(stmt,stmt.getMainTableExpression());