1
0
mirror of synced 2025-01-31 12:32:59 +03:00

Add xml code block for OrderBy

This commit is contained in:
Richard Shank 2012-06-20 03:41:20 -07:00
parent b4a9b1550c
commit de9f053cfb

View File

@ -27,6 +27,18 @@ can specify the ``@OrderBy`` in the following way:
private $groups; private $groups;
} }
.. code-block:: xml
<doctrine-mapping>
<entity name="User">
<many-to-many field="groups" target-entity="Group">
<order-by>
<order-by-field name="name" direction="ASC" />
</order-by>
</many-to-many>
</entity>
</doctrine-mapping>
The DQL Snippet in OrderBy is only allowed to consist of The DQL Snippet in OrderBy is only allowed to consist of
unqualified, unquoted field names and of an optional ASC/DESC unqualified, unquoted field names and of an optional ASC/DESC
positional statement. Multiple Fields are separated by a comma (,). positional statement. Multiple Fields are separated by a comma (,).