[DC-347] AddPendingJoinConditions doesn't work if alias equals model name Created: 09/Dec/09  Updated: 29/Jan/10

Status: Open
Project: Doctrine 1
Component/s: Query
Affects Version/s: 1.2.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Christian Jaentsch Assignee: Guilherme Blanco
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File AliasEqualsModelNameTestCase.php    

 Description   

If the alias in a from-query is equal to the model name, I get an exception when executing the query after adding a "pendingJoinCondition".

See attached testCase.



 Comments   
Comment by David Abdemoulaie [ 29/Jan/10 ]

I fail to see why you would use an alias that is equal to the model name.

Comment by Christian Jaentsch [ 29/Jan/10 ]

To clarify again: Using an alias equal to the model name is the same as not using an alias at all. The built sql is the same afterwards (and the addPendingJoinCondition behaviour is the same as well).

I would not use an alias equal to the model name myself, but sometimes this is used in Doctrine core, e.g. in Doctrine_Relation_ForeignKey around line 60. So to solve the problem either all the core queries, where no alias or an alias equal to the model name is used, have to be rewritten or the behaviour of a respective query has to be changed somehow so that applying an addPendingJoinCondition is possible even in the given case.

Generated at Sat Apr 19 14:46:29 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.