Hi Matthew,
Nice post, thanks for sharing. I was thinking a bit about this a few weeks ago, but I haven't had a chance to dump some of this ideas into code or even an email. I had some ideas on how to better handle some of these, but I wanted to check how things actually work currently on geddy and have a reference of how things work on rails. Denormalizing single attributes or even arrays is simple, but nested models/documents is tricky (or I might be missing something).
If I understand correctly, when using mongo, each model will be in it's own collection. hasMany, hasOne or belongsTo will just add FK like references in the right places. I was thinking we should be explicit about this and have an hasManyEmbedded and hasOneEmbedded (belongsTo wouldn't make sense). If we didn't care about backward compatibility, I would make the default embedded and have to opt-out. However, I kinda like the idea of using different base class, it wouldn't make a lot of sense to use something as an 'EmbeddedDocument' and also to store the exact same structure in it's own collection depending on how you save it.
What do you guys think?