jmkgreen/morphia — pull request #10 by benmccann (2012-11-04 07:04:36+00:00)
Title: Test showing compound key failure

This test fails and demonstrates issue #9.

Run only the new failing test method with:
mvn -Dtest=com.github.jmkgreen.morphia.TestMapper#ReferenceCustomId test

The problem looks to be the last line in DefaultMapper.keyToRef:
return new DBRef(null, key.getKind(), key.getId());

The key id should be serialized before being placed in the DBRef