a.testId = "Hello from A";
a.save();
CompositeIdForeignB b = new CompositeIdForeignB();
b.testId = "Hello from B";
b.save();
CompositeIdEntity e = new CompositeIdEntity();
e.compositeIdForeignA = a;
e.compositeIdForeignB = b;
e.save();
Map<String, String[]> params = new HashMap<String, String[]>();
params.put("object.compositeIdForeignA.id", new String[]{a.id.toString()});
params.put("object.compositeIdForeignB.id", new String[]{b.id.toString()});
CompositeIdEntity bound = (CompositeIdEntity)Binder.bind("object", CompositeIdEntity.class, CompositeIdEntity.class, null, params);
Logger.info("1" + e._key());
Logger.info("2" + bound._key());
// they have to be the same object
assertEquals(bound, e);