diff --git a/manual/new/docs/en/dql-doctrine-query-language.txt b/manual/new/docs/en/dql-doctrine-query-language.txt
index 55f66f8c7..53a6a9677 100644
--- a/manual/new/docs/en/dql-doctrine-query-language.txt
+++ b/manual/new/docs/en/dql-doctrine-query-language.txt
@@ -4,6 +4,7 @@
++ DELETE queries
++ FROM clause
++ JOIN syntax
+++ MAP keyword
++ WHERE clause
++ Conditional expressions
++ Functional Expressions
diff --git a/manual/new/docs/en/dql-doctrine-query-language/join-syntax.txt b/manual/new/docs/en/dql-doctrine-query-language/join-syntax.txt
index cd8a1d85f..7da7cf403 100644
--- a/manual/new/docs/en/dql-doctrine-query-language/join-syntax.txt
+++ b/manual/new/docs/en/dql-doctrine-query-language/join-syntax.txt
@@ -1,10 +1,10 @@
Syntax:
-[[LEFT | INNER] JOIN ] [ON | WITH] ,
-[[LEFT | INNER] JOIN ] [ON | WITH] ,
-...
-[[LEFT | INNER] JOIN ] [ON | WITH]
+[[LEFT | INNER] JOIN ] [ON | WITH] [MAP] ,
+[[LEFT | INNER] JOIN ] [ON | WITH] [MAP] ,
+...
+[[LEFT | INNER] JOIN ] [ON | WITH] [MAP]
DQL supports two kinds of joins INNER JOINs and LEFT JOINs. For each joined component, you can optionally specify an alias.
@@ -37,6 +37,7 @@ Would have a SQL equivalent:
SELECT u.id AS u__id, p.id AS p__id FROM User u LEFT JOIN Phonenumber p ON u.id = p.user_id
++++ ON keyword
If you want to override this behaviour and add your own custom join condition you can do it with the {{ON}} keyword. Consider the following DQL query:
@@ -49,6 +50,7 @@ This query would be converted into SQL:
SELECT u.id AS u__id, p.id AS p__id FROM User u LEFT JOIN Phonenumber p ON u.id = 2
++++ WITH keyword
Most of the time you don't need to override the primary join condition, rather you may want to add some custom conditions. This can be achieved with the {{WITH}} keyword.
DQL:
@@ -61,6 +63,7 @@ SQL:
SELECT u.id AS u__id, p.id AS p__id FROM User u LEFT JOIN Phonenumber p ON u.id = p.user_id AND u.id = 2
+
The Doctrine_Query API offers two convenience methods for adding JOINS. These are called innerJoin() and leftJoin(), which usage should be quite intuitive as shown below:
@@ -71,5 +74,4 @@ $q->from('User u')
->leftJoin('u.Email e');
$users = $q->execute();
-
-
+
diff --git a/manual/new/docs/en/dql-doctrine-query-language/map-keyword.txt b/manual/new/docs/en/dql-doctrine-query-language/map-keyword.txt
new file mode 100644
index 000000000..b0a70c18d
--- /dev/null
+++ b/manual/new/docs/en/dql-doctrine-query-language/map-keyword.txt
@@ -0,0 +1,32 @@
+++ MAP keyword
+
+The MAP keyword offers a way of mapping certain columns as collection / array keys. By default Doctrine maps multiple elements to numerically indexed arrays / collections. The mapping starts from zero. In order to override this behaviour you need to use MAP keyword as shown above:
+
+
+$q = new Doctrine_Query();
+$q->from('User u MAP u.name');
+
+$users = $q->execute();
+
+
+Now the users in $users collection are accessible through their names.
+
+
+print $user['jack daniels']->id;
+
+
+The MAP keyword can be applied to any given JOIN. This means that any given component can have each own mapping behaviour. In the following we use distinct mappings for both Users and Groups.
+
+
+
+$q = new Doctrine_Query();
+$q->from('User u MAP u.name')->innerJoin('u.Group g MAP g.name');
+
+$users = $q->execute();
+
+
+Now lets print out the drinkers club's creation date.
+
+
+print $users['jack daniels']->Group['drinkers club']->createdAt;
+