Details
Description
If an entity has a foreign key as part of its primary key and you try to query that entity in a subselect clause in DQL, an exception is thrown in ClassMetadataInfo->getQuotedColumnName. The problem seems to be that it's only considering the field mappings rather than both the field and association mappings when it's looking for the correct column name.
Example entities:
- Article(id primary key, title, content)
- ArticleTag(article_id, tag, primary key (article_id, tag))
Example DQL: select art from Article art where exists (select tag from ArticleTag tag where tag.article = art)
Activity
Benjamin Eberlei
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Benjamin Eberlei [ beberlei ] | Guilherme Blanco [ guilhermeblanco ] |
Guilherme Blanco
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.2-DEV [ 10157 ] | |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Fix Version/s | 2.1.3 [ 10164 ] | |
| Fix Version/s | 2.2-DEV [ 10157 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 13100 ] | jira-feedback [ 15072 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 15072 ] | jira-feedback2 [ 16936 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 16936 ] | jira-feedback3 [ 19189 ] |