DDC-1700: [GH-302] by jonathaningram: Added failing test case for querying and joining on an associated inheri... #2140

Closed
opened 2026-01-22 13:42:29 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Mar 13, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of jonathaningram:

Url: https://github.com/doctrine/doctrine2/pull/302

Message:

...tance hierarchy

I have written this (partial) failing unit test. When running the test, you'll receive the Semantical Exception as follows:

[Semantical Error] line 0, col 81 near 'idd WHERE idd': Error: Class Doctrine\Tests\Models\Document\ImageDocument has no association named data

I expect that either:

  1. This is expected behaviour. In which case, I'll update the test to expect the semantical exception.
  2. This is a bug (I do hope it is!). In which case, any thoughts on a fix?

Either way, such a query would be great to have in the documentation (including the semantical error), so that when searching for the error, the Doctrine docs appear.

FYI, this has come up from my recent work on trying to find a solution for large inheritance hierarchies (and join limits) and solving the problem by using single table inheritance and associating a "data" class on the base class of the large hierarchy.

P.S. I hope that I do not have a flawed understanding of the ORM and that I'm trying to construct an impossible query/mapping. If so, apologies :)

Originally created by @doctrinebot on GitHub (Mar 13, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: This issue is created automatically through a Github pull request on behalf of jonathaningram: Url: https://github.com/doctrine/doctrine2/pull/302 Message: ...tance hierarchy I have written this (partial) failing unit test. When running the test, you'll receive the Semantical Exception as follows: ``` [Semantical Error] line 0, col 81 near 'idd WHERE idd': Error: Class Doctrine\Tests\Models\Document\ImageDocument has no association named data ``` I expect that either: 1. This is expected behaviour. In which case, I'll update the test to expect the semantical exception. 2. This is a bug (I do hope it is!). In which case, any thoughts on a fix? Either way, such a query would be great to have in the documentation (including the semantical error), so that when searching for the error, the Doctrine docs appear. FYI, this has come up from my recent work on trying to find a solution for large inheritance hierarchies (and join limits) and solving the problem by using single table inheritance and associating a "data" class on the base class of the large hierarchy. P.S. I hope that I do not have a flawed understanding of the ORM and that I'm trying to construct an impossible query/mapping. If so, apologies :)
admin added the Bug label 2026-01-22 13:42:29 +01:00
admin closed this issue 2026-01-22 13:42:29 +01:00
Author
Owner

@doctrinebot commented on GitHub (Mar 14, 2012):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Mar 14, 2012): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2140