Skip to content

Commit ba17a28

Browse files
committed
Merge pull request #238
2 parents 5f308ee + 88a6763 commit ba17a28

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Resources/doc/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,17 @@ same than the `entity` provider described in :doc:`the cookbook</cookbook/securi
738738
</provider>
739739
</config>
740740
741+
Validation
742+
----------
743+
744+
This bundle provides a ``Unique`` constraint, which extends the `UniqueEntity`_
745+
constraint provided by Symfony's Doctrine bridge. This constraint allows you to
746+
validate the uniqueness of an document field against the database.
747+
748+
The ``Unique`` constraint shares the same options as `UniqueEntity`_, which
749+
means that the ``em`` option should be used if you wish to specify the document
750+
manager explicitly instead of having it be inferred from the document class.
751+
741752
Using the Abstraction Layer
742753
---------------------------
743754

@@ -792,3 +803,4 @@ Learn more from the Cookbook
792803
.. _`Conditional Operators`: http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/query-builder-api.html#conditional-operators
793804
.. _`Event Documentation`: http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/events.html
794805
.. _`PHP Documentation`: http://www.php.net/manual/en/mongo.tutorial.php
806+
.. _`UniqueEntity`: http://symfony.com/doc/current/reference/constraints/UniqueEntity.html

0 commit comments

Comments
 (0)