Hibernate won't add Discriminator Column to Table?

I answered my own question. Bernate can't add a new not-null column and the Discriminator is a not-null column. A way to fix it is to add columnDefinition to specify a default DiscriminatorColumn(name = "DISCRIMINATOR", discriminatorType = DiscriminatorType.

STRING, columnDefinition = "varchar default 'SomeOther'" , length = 20) So this would default all the rows that don't have the discriminator to be of the type SomeOtherEntity However, this is not a good solution because it forces you to use varchar which may be database specific. So thanks bernate for not allowing to change a declared entity into a superclass.

I answered my own question. Bernate can't add a new not-null column and the Discriminator is a not-null column. A way to fix it is to add columnDefinition to specify a default @DiscriminatorColumn(name = "DISCRIMINATOR", discriminatorType = DiscriminatorType.

STRING, columnDefinition = "varchar default 'SomeOther'" , length = 20) So this would default all the rows that don't have the discriminator to be of the type SomeOtherEntity. However, this is not a good solution because it forces you to use varchar which may be database specific. So thanks bernate for not allowing to change a declared entity into a superclass.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions