hibernate/hibernate-ogm — pull request #388 by DavideD (2014-10-14 10:29:56+00:00)
Title: OGM-451 Perform insert of entity with embedded associations in one operation in MongoDB

https://hibernate.atlassian.net/browse/OGM-451

The first commit is a fix for a bug in the `OperationsQueue` class.

Basically, when getAssociation is called I check if the EntityKey corresponding to the association is in the queue, if that's the case, I will return it. Otherwise, I create a new association and store it in the queue.
This way when I flush all the operations in the DB I can update the object with the association before inserting it.
This will work for the IN_ENTITY storage type.