Association Mapping =================== Graph Traversal and Identity Map -------------------------------- Doctrine CouchDB offers you a fluent experience with your CouchDB documents. All relationships are fully traversable through lazy loading. You essentially need to query only one document explicitly and can then access all the others that are related by traversing the references in the objects. A document manager contains an identity map, it will never return you different instances of PHP objects for the document with the same ID. Different Association Mappings ------------------------------ Doctrine CouchDB offers several different mechanisms to manage relations between documents: - Reference one document through its document-id - Reference many documents by saving all the document-ids in an array - Finding all documents that have a reference many relationship to the current document (inverse reference many/one) - Embedding a single document - Embedding an array of documents ReferenceOne ~~~~~~~~~~~~ You can have a reference between two documents by a reference one relationship in the following way: .. code-block:: php