DDC-1339: New DQL function: IDENTITY(SingleValuedAssociationPathExpression) #1679

Closed
opened 2026-01-22 13:21:57 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 19, 2011).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user @guilhermeblanco:

Suppose the association: User N:1 Group and user wants to be able to retrieve "users.group_id" without joining the Group entity.
This lead us to create a new DQL function:

SELECT IDENTITY(u.Group) AS group_id FROM User u WHERE u.id = ?0
Originally created by @doctrinebot on GitHub (Aug 19, 2011). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user @guilhermeblanco: Suppose the association: User N:1 Group and user wants to be able to retrieve "users.group_id" without joining the Group entity. This lead us to create a new DQL function: ``` SELECT IDENTITY(u.Group) AS group_id FROM User u WHERE u.id = ?0 ```
admin added the New Feature label 2026-01-22 13:21:57 +01:00
admin closed this issue 2026-01-22 13:21:58 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 8, 2011):

Comment created by @guilhermeblanco:

Implemented a7f3af8328

@doctrinebot commented on GitHub (Sep 8, 2011): Comment created by @guilhermeblanco: Implemented https://github.com/doctrine/doctrine2/commit/a7f3af8328b031a6f006eef1062554bf9f57e1df
Author
Owner

@doctrinebot commented on GitHub (Sep 8, 2011):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 8, 2011): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Mar 12, 2015):

Comment created by marconyfelipe:

Hi Guilherme! How r u?

Abel has sending a BIG THANK YOU! :-)

Bye!

@doctrinebot commented on GitHub (Mar 12, 2015): Comment created by marconyfelipe: Hi Guilherme! How r u? Abel has sending a BIG THANK YOU! :-) Bye!
Author
Owner

@doctrinebot commented on GitHub (Jul 18, 2015):

Comment created by marcospassos:

It does not work properly for custom types, see:
http://www.doctrine-project.org/jira/browse/DDC-3797

@doctrinebot commented on GitHub (Jul 18, 2015): Comment created by marcospassos: It does not work properly for custom types, see: http://www.doctrine-project.org/jira/browse/[DDC-3797](http://www.doctrine-project.org/jira/browse/DDC-3797)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1679