DataMapLoader loader = runtime.getInjector().getInstance(
DataMapLoader.class);
URL url = getClass().getClassLoader().getResource(
"inheritance-vertical.map.xml");
DataMap dataMap = loader.load(new URLResource(url));
EntityResolver resolver = new EntityResolver(
Collections.singleton(dataMap));
ObjEntity iv2Sub1 = resolver.lookupObjEntity(Iv2Sub1.class);
ObjRelationship x = (ObjRelationship) iv2Sub1