This is more of a question rather than an issue. On our website, users can exchange messages related to a certain object that is stored in our DB (Mongo) as an embedded document in another object. These messages are stored on the embedded document in an array (reason being that we cannot reference embedded documents from other documents).
Now, we want to centralize the messages into their own collection so that we can present them in a unified inbox on the site (along with messages related to other objects). We'd like to do this without having to move out the embedded documents out of the parent objects. We were thinking of making changes to the ODM so that a document can reference embedded documents (think ReferenceEmbedOne and ReferenceEmbedMany annotations). In theory, this sounds like it wouldn't be too hard to implement, but I was wondering if I could get your thoughts on this, @jwage. Could you point me to the classes that I should look at to implement something like this?
I don't think it would be easily possible to do that.