DDC-769: Disabling discriminator column in WHERE clause #947

Open
opened 2026-01-22 12:56:47 +01:00 by admin · 3 comments
Owner

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

Jira issue originally created by user lstrojny:

Per default Doctrine 2 adds an IN(...)-part to the query when hydrating an entity where a discriminator column is defined. While this makes sense as a default behavior, it would be pretty helpful if one could disable the WHERE-clause for discriminator columns alltogether for performance optimization.

Originally created by @doctrinebot on GitHub (Aug 26, 2010). Jira issue originally created by user lstrojny: Per default Doctrine 2 adds an IN(...)-part to the query when hydrating an entity where a discriminator column is defined. While this makes sense as a default behavior, it would be pretty helpful if one could disable the WHERE-clause for discriminator columns alltogether for performance optimization.
admin added the Improvement label 2026-01-22 12:56:47 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 26, 2010):

Comment created by romanb:

That would obviously produce wrong results. Maybe you can elaborate more with an example.

@doctrinebot commented on GitHub (Aug 26, 2010): Comment created by romanb: That would obviously produce wrong results. Maybe you can elaborate more with an example.
Author
Owner

@doctrinebot commented on GitHub (Sep 7, 2010):

Comment created by lstrojny:

I use ENUM("foo","bar") as discriminator columns. That means, the column will contain the right values out of the box, no further result set limiting required with WHERE.

@doctrinebot commented on GitHub (Sep 7, 2010): Comment created by lstrojny: I use ENUM("foo","bar") as discriminator columns. That means, the column will contain the right values out of the box, no further result set limiting required with WHERE.
Author
Owner

@iricketson commented on GitHub (Nov 30, 2017):

Possibly related to #3596

@iricketson commented on GitHub (Nov 30, 2017): Possibly related to #3596
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#947