PeteWeissbrod wrote:
I want to know why this is by design, the discriminator is already specified in the mappings for the subclass, why should a one-to-many mapping have a where clause that repeats the value of the discriminator, this is redundant information isnt it?!
Now, I can't actually tell you why this is by design, I can only guess as to why it is by design.
My guess is that a bug was found with the old 1.0.x logic in automatically filling in the discriminator values, and then because of the complexity of that bug is was decided to remove the feature rather than fix it. Now, maybe there is even an issue why they can't resolve it.
Do think about this issue for a second though. Sure, you may have a simple inheritance structure, but that does not mean that everyone else does as well. There could be any number of potential items which match that many-to-one. Every potential object which could be of that type must be added to the discriminator in a IN (list of discriminators) fashion.
It still seems like that logic could work (I thought that's what 1.0.x did after all) but there must be a complex case that won't work.
Everything you've seen above is a guess as to why it does not exist. It certainly is a more complex feature than it first appears though.