ObjectContext context = runtime.newContext();
UuidRoot1 r1 = Cayenne.objectForPK(context, UuidRoot1.class, 1);
assertEquals("E1:1", r1.getUuid());
E1 e1 = context.newObject(E1.class);
IdCoder refHandler = new IdCoder(context
.getEntityResolver());
ObjectIdRelationshipHandler handler = new ObjectIdRelationshipHandler(refHandler);
handler.relate(r1, e1);