hibernate/hibernate-ogm — pull request #261 by gunnarmorling (2013-12-09 14:21:13+00:00)
Title: OGM-389 Adding support for storing associations embedded within CouchDB entity documents

This PR makes associations storable withing CouchDB entity documents if configured so. From a high-level perspective, the PR comprises the following changes:

* Provided API, annotation and `Configuration` property to configure the association storage strategy for CouchDB
* Enhanced association-related methods on `GridDialect` to pass the effectively applying options for a given association into the dialect; I.e. a dialect doesn't have to deal with the overriding rules we discussed, it can simply obtain the effective value for a given option from the passed context object
* Provided public `OgmSessionFactory` API which allows to perform a programmatic configuration of the underlying store; renamed the existing `OgmSessionFactory` into `OgmSessionFactoryImpl`
* Refactored and cleaned up the CouchDB dialect, in particular there is a common abstract representation of associations independent from the specific storage strategy and a reference to the document is kept in the association snapshot to avoid re-reading it upon update

I might push some more minor clean ups but in generally I'm done with the change and thus look forward to your feedback.