Add support for embedded polymorphic belongsTo

Fixes #2265.
Is this what we want ? I've also seen `secretLab: {id: "1", type: "batCave"}` to describe polymorphism relation.