DDC-1731: Unable to Simply Get Foreign Identifier in SELECT #2179

Closed
opened 2026-01-22 13:43:24 +01:00 by admin · 2 comments
Owner

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

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user kherge:

This DQL

SELECT r.type FROM record r

Will trigger this error:

[Semantical Error] line 0, col 9 near 'type': Error: Invalid PathExpression. Must be a StateFieldPathExpression. #0 

When this DQL won't:

SELECT f.id FROM record r JOIN r.type f

This is computationally expensive when working with hundreds of thousands of records.

Originally created by @doctrinebot on GitHub (Mar 28, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user kherge: This DQL ``` SELECT r.type FROM record r ``` Will trigger this error: ``` [Semantical Error] line 0, col 9 near 'type': Error: Invalid PathExpression. Must be a StateFieldPathExpression. #0 ``` When this DQL won't: ``` SELECT f.id FROM record r JOIN r.type f ``` This is computationally expensive when working with hundreds of thousands of records.
admin added the Bug label 2026-01-22 13:43:24 +01:00
admin closed this issue 2026-01-22 13:43:24 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 1, 2012):

Comment created by @beberlei:

SELECT IDENTITY(r.type) AS id FROM Record r

@doctrinebot commented on GitHub (Apr 1, 2012): Comment created by @beberlei: SELECT IDENTITY(r.type) AS id FROM Record r
Author
Owner

@doctrinebot commented on GitHub (Apr 1, 2012):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Apr 1, 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#2179