Details
Description
When trying to use a refclass property - i.e. normalization table column - in a query, an unnecessary join is added to the query created, which is then used to "access" the property.
This issue has already been discussed back in May 2008 but still seems to persist.
Please see the google group discussion http://groups.google.com/group/doctrine-user/browse_thread/thread/c655832a450ccd1a/9cb6eca6ae1c3dee for example + comments.
Unfortunately it is hardly possible to write a test case for this, as working SQL is generated, but the query is just not right (test case basically would have to assert the query string, wich does not make much sense).
Another way to test if it does "what it should", could be to assert contents of $q->getTableAliasMap() - but does not seem ideal either.
John Wage commented on this issue
"Can you create a ticket for this with a failing test case? I believe this
should be possible and we should investigate a fix for it.
Thanks, Jon "
http://groups.google.com/group/doctrine-user/browse_thread/thread/c655832a450ccd1a/9cb6eca6ae1c3dee#msg_c73934a38515cadb