[DC-534] Couldn't hydrate. Found non-unique key mapping named 'lang' Created: 02/Mar/10  Updated: 28/Dec/11  Resolved: 15/Mar/10

Status: Resolved
Project: Doctrine 1
Component/s: I18n
Affects Version/s: 1.2.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Adamczewski Assignee: Jonathan H. Wage
Resolution: Incomplete Votes: 0
Labels: None
Environment:

PHP 5.2.9 Symfony 1.4



 Description   

For the following query

return $this->createQuery('a')
->innerJoin('a.Translation t WITH t.lang = ?', $lang)
->innerJoin('a.UserAttributes ua')
->innerJoin('ua.AttrOptions o WITH o.attribute_id = a.id')
->innerJoin('o.Translation ot WITH ot.lang = ?', $lang)
->addWhere('ua.user_id = ?', $userId)
->addWhere('a.tab = ?', $tab)
->addOrderBy('a.ord asc')
->execute();

Unknown macro: {/quote}

i get

Couldn't hydrate. Found non-unique key mapping named 'lang'.

{/quote}

error, so i cannot join more than one translation table in one query because it cause error.



 Comments   
Comment by Jonathan H. Wage [ 02/Mar/10 ]

Can you create a test case for this? You can find information about Doctrine unit testing here: http://www.doctrine-project.org/documentation/manual/1_2/en/unit-testing

Comment by Mikhail Menshinskiy [ 28/Dec/11 ]

I have the same error.
How to solve this issue?

Generated at Wed Apr 23 16:11:37 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.