From 939ca1b85f949b7e50a7b3d7b4136bd42e7aff3e Mon Sep 17 00:00:00 2001 From: "Fabio B. Silva" Date: Sun, 13 Jan 2013 15:08:25 -0200 Subject: [PATCH] Docs for IDENTITY() composite primary key --- en/reference/dql-doctrine-query-language.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/en/reference/dql-doctrine-query-language.rst b/en/reference/dql-doctrine-query-language.rst index 2ad6f5faf..e4cc59d81 100644 --- a/en/reference/dql-doctrine-query-language.rst +++ b/en/reference/dql-doctrine-query-language.rst @@ -424,6 +424,12 @@ Get all users visible on a given website that have chosen certain gender: createQuery('SELECT u FROM User u WHERE u.gender IN (SELECT IDENTITY(agl.gender) FROM Site s JOIN s.activeGenderList agl WHERE s.id = ?1)'); +IDENTITY() DQL Function when the association has a composite primary key: + +.. code-block:: php + + createQuery('SELECT IDENTITY(c.location, 'latitude') AS latitude, IDENTITY(c.location, 'longitude') AS longitude FROM Checkpoint c WHERE c.user = ?1'); Partial Object Syntax ^^^^^^^^^^^^^^^^^^^^^ @@ -547,7 +553,7 @@ The following functions are supported in SELECT, WHERE and HAVING clauses: -- IDENTITY(single\_association\_path\_expression) - Retrieve the foreign key column of association of the owning side +- IDENTITY(single\_association\_path\_expression [, fieldMapping]) - Retrieve the foreign key column of association of the owning side - ABS(arithmetic\_expression) - CONCAT(str1, str2) - CURRENT\_DATE() - Return the current date