Skip to content

Commit

Permalink
Change simple references to ID references
Browse files Browse the repository at this point in the history
  • Loading branch information
malarzm authored and alcaeus committed Dec 19, 2017
1 parent 5aa958a commit c0c0d0d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
4 changes: 0 additions & 4 deletions docs/en/reference/annotations-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,6 @@ Optional attributes:
-
targetDocument - A |FQCN| of the target document. A ``targetDocument`` is
required when using ``storeAs: id``.
-
simple - deprecated (use ``storeAs: id``)
-
storeAs - Indicates how to store the reference. ``id`` stores the identifier,
``ref`` an embedded object containing the ``id`` field and (optionally) a
Expand Down Expand Up @@ -1005,8 +1003,6 @@ Optional attributes:
-
targetDocument - A |FQCN| of the target document. A ``targetDocument`` is
required when using ``storeAs: id``.
-
simple - deprecated (use ``storeAs: id``)
-
storeAs - Indicates how to store the reference. ``id`` stores the identifier,
``ref`` an embedded object containing the ``id`` field and (optionally) a
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/priming-references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ queries (one per discriminated class name).

.. note::

Priming is also compatible with :ref:`simple references <storing_references>`
Priming is also compatible with :ref:`ID references <storing_references>`
and discriminated references. When priming discriminated references, ODM
will issue one query per distinct class among the referenced document(s).

Expand Down
11 changes: 3 additions & 8 deletions docs/en/reference/reference-mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ Storing References
By default all references are stored as a `DBRef`_ object with the traditional
``$ref``, ``$id``, and (optionally) ``$db`` fields (in that order). For references to
documents of a single collection, storing the collection (and database) names for
each reference may be redundant. You can use simple references to store the
each reference may be redundant. You can use ID references to store the
referenced document's identifier (e.g. ``MongoId``) instead of a `DBRef`_.

Example:
Expand Down Expand Up @@ -346,8 +346,8 @@ Example:
Now, the ``profile`` field will only store the ``MongoId`` of the referenced
Profile document.

Simple references reduce the amount of storage used, both for the document
itself and any indexes on the reference field; however, simple references cannot
ID references reduce the amount of storage used, both for the document
itself and any indexes on the reference field; however, ID references cannot
be used with discriminators, since there is no `DBRef`_ object in which to store
a discriminator value.

Expand All @@ -363,11 +363,6 @@ The ``storeAs`` option has the following possible values:
- **ref**: Uses a custom embedded object with an ``id`` field
- **id**: Uses the identifier of the referenced object

.. note::

The ``storeAs=id`` option used to be called a "simple reference". The old syntax is
still recognized (so using ``simple=true`` will imply ``storeAs=id``).

.. note::

For backwards compatibility ``storeAs=dbRefWithDb`` is the default, but
Expand Down

0 comments on commit c0c0d0d

Please sign in to comment.