doctrine/doctrine2 — pull request #886 by Strate (2013-12-22 17:13:25+00:00)
Title: [DDC-1256] Fix applying ON/WITH conditions to first join in Class Table Inheritance

Some related issues:
http://www.doctrine-project.org/jira/browse/DDC-1256
http://www.doctrine-project.org/jira/browse/DDC-2131

I think that applying custom user joins conditions to last join in CTI is ok because only in last join DB will know about all joined table aliases. And I can't see any other probles with this.

Tests are not passed, because, I think, problem in tests.

To be discussed, of course