DDC-379: Implement entity aliases #471

Open
opened 2026-01-22 12:39:18 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 26, 2010).

Originally assigned to: @jwage on GitHub.

Jira issue originally created by user @jwage:

Similar to how you can use the "use" statement in PHP, it would be nice if DQL had a concept of a default namespace or something.

$q = $em->createQuery('SELECT e FROM Bundle\MyBundle\Entities\TestEntity e');

If I am inside the MyBundle namespace I would want to set something that would allow me to just reference it like this:

$q = $em->createQuery('SELECT e FROM Entities\TestEntity e');
Originally created by @doctrinebot on GitHub (Feb 26, 2010). Originally assigned to: @jwage on GitHub. Jira issue originally created by user @jwage: Similar to how you can use the "use" statement in PHP, it would be nice if DQL had a concept of a default namespace or something. ``` $q = $em->createQuery('SELECT e FROM Bundle\MyBundle\Entities\TestEntity e'); ``` If I am inside the MyBundle namespace I would want to set something that would allow me to just reference it like this: ``` $q = $em->createQuery('SELECT e FROM Entities\TestEntity e'); ```
admin added the New Feature label 2026-01-22 12:39:18 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#471