ObjectContext context = createDataContext();
ObjEntity entity = context.getEntityResolver().lookupObjEntity(MtTable1Subclass.class);
Expression qualifier = entity.getDeclaredQualifier();
try {
MtTable1Subclass ee = context.newObject(MtTable1Subclass.class);
assertEquals(ee.getGlobalAttribute1(), "sub1");
//check AND
entity.setDeclaredQualifier(qualifier.andExp(Expression.fromString("serverAttribute1 = 'sa'")));
ee = context.newObject(MtTable1Subclass.class);
assertEquals(ee.getGlobalAttribute1(), "sub1");
assertEquals(ee.getServerAttribute1(), "sa");
}
finally {
entity.setDeclaredQualifier(qualifier);
}
}