No description provided.
thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:
fixes case when an entity has a relationship with a class with joined…
I rebased this PR. Should I do something else to get this fixed?
@fran6co I haven't had time to evaluate this yet, can you say what goes wrong when you don't have this fix applied?
@beberlei I think it doesn't make sense looking it now, I think this use case can be avoided by using the full name class in the DQL.
The idea was to be able to work with subclasses of relationships. For example, CompanyOrganization has many events, but events can be of different type (CompanyAuction or CompanyRaffle). I couldn't figure out a nice way to get just a specific type (all auctions or all raffles) or to get CompanyOrganization that have auctions with some specific value. So, I added a OneToMany relationship to CompanyOrganization named auctions. Doctrine handles that well in most of the cases but fails when I try to do something like this:
select c from Doctrine\Tests\Models\Company\CompanyOrganization c INNER JOIN c.auctions a WHERE a.data = ?1
But I think it can be solved just with DQL by doing this:
select c from Doctrine\Tests\Models\Company\CompanyOrganization c JOIN Doctrine\Tests\Models\Company\CompanyAuction a WITH a.organization = c WHERE a.data = ?1