.. toc::

    .. tocheader:: Tutorials

    .. toctree::
       :depth: 3
       :glob:

       tutorials/*

.. toc::

    .. tocheader:: Reference

    .. toctree::
       :depth: 3

       reference/introduction
       reference/architecture
       reference/basic-mapping       
       reference/reference-mapping
       reference/bidirectional-references
       reference/complex-references
       reference/indexes
       reference/inheritance-mapping
       reference/embedded-mapping
       reference/trees
       reference/storing-files-with-gridfs
       reference/xml-mapping
       reference/annotations-reference
       reference/metadata-drivers
       reference/working-with-objects
       reference/document-repositories
       reference/events
       reference/migrating-schemas
       reference/query-builder-api
       reference/aggregation-builder
       reference/geospatial-queries
       reference/find-and-update
       reference/filters
       reference/priming-references
       reference/capped-collections
       reference/storage-strategies
       reference/custom-collections
       reference/sharding
       reference/transactions-and-concurrency
       reference/best-practices
       reference/change-tracking-policies

.. toc::

    .. tocheader:: Cookbook

    .. toctree::
       :depth: 3
       :glob:

       cookbook/*

.. toc::

    .. tocheader:: Tutorials

    .. toctree::
       :depth: 3
       :glob:

       tutorials/*

.. toc::

    .. tocheader:: Reference

    .. toctree::
       :depth: 3

       reference/introduction
       reference/architecture
       reference/console-commands
       reference/basic-mapping
       reference/reference-mapping
       reference/bidirectional-references
       reference/complex-references
       reference/indexes
       reference/inheritance-mapping
       reference/embedded-mapping
       reference/trees
       reference/storing-files-with-gridfs
       reference/xml-mapping
       reference/annotations-reference
       reference/metadata-drivers
       reference/working-with-objects
       reference/document-repositories
       reference/events
       reference/migrating-schemas
       reference/query-builder-api
       reference/aggregation-builder
       reference/geospatial-queries
       reference/find-and-update
       reference/upserting-documents
       reference/filters
       reference/priming-references
       reference/capped-collections
       reference/storage-strategies
       reference/custom-collections
       reference/sharding
       reference/transactions-and-concurrency
       reference/best-practices
       reference/change-tracking-policies

.. toc::

    .. tocheader:: Cookbook

    .. toctree::
       :depth: 3
       :glob:

       cookbook/*

Add console commands and upserting chapters
Add console commands and upserting chapters
