Add Type (discriminator) function #7219

Open
opened 2026-01-22 15:47:14 +01:00 by admin · 0 comments
Owner

Originally created by @raziel057 on GitHub (Sep 5, 2023).

Q A
New Feature yes
RFC no
BC Break no

Summary

It would be nice to add native support for TYPE function. When you have entities mapped with a discriminator it's can be useful to be able to get the discriminator information without having to hydrate objects (with scalar or array hydration).

It can be implemented in simple and efficient way as we already have all information:
https://gist.github.com/jasonhofer/8420677

What do you think about this?

Originally created by @raziel057 on GitHub (Sep 5, 2023). | Q | A |------------ | ------ | New Feature | yes | RFC | no | BC Break | no #### Summary It would be nice to add native support for TYPE function. When you have entities mapped with a discriminator it's can be useful to be able to get the discriminator information without having to hydrate objects (with scalar or array hydration). It can be implemented in simple and efficient way as we already have all information: https://gist.github.com/jasonhofer/8420677 What do you think about this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7219