If I make an entity to an entity using Inheritance, the discriminator column is made not null by default:
[Entity]
[Inheritance(TInheritanceStrategy.SingleTable)]
[DiscriminatorColumn('TYPE', TDiscriminatorType.dtString)]
TEntity = class
...;
TObjectManager.Update executes this statement:
ALTER TABLE ENTITY
ADD TYPE VARCHAR(30) NOT NULL
this does not work for existing data, as all new fields do, that are not nullable.
For some tests I created the column by myself with default = ' '. (CHR(32))
I got a little bit confused, why
ObjectManager.Find<TEntity>.Select(Linq['ID'].Count).UniqueValue;
came up with this statement:
SELECT count(A.ID as f0_)
FROM ENTITY A
WHERE A.Type in (:p_0, :p_1, :p_2)
p_0 = NULL
p_1 = "CCtc"
p_2 = "PCtc"
How can I set the DiscriminatorColumn nullable, because it looks like it should be possible?