Here's a screenshot of my relationship settings.
This results in the following generated mapping:
Code: Select all
My discriminator values are simple numeric values like "1000", "1001", etc. - but it turns out the opposite end of each inheritance has it's own Type and Column.Type specifications, and those were set to the default, "string" type!
How come I'm allowed to have mismatching discriminator types?
It seems like, if you change a base discriminator type, this ought to propagate to all derived discriminator types?
Or at least, the "validate" function on the model should report these as errors?
Also, base-classes must have a discriminator value, unless they're configured as Abstract=True - this could be added to validation as well.