Hello I have a Subclass which needs to cover multiple Discriminator Values.
something like:
@DiscriminatorValue(value = \"ACT\",\"DNR\",\"ATT\" )
would d
You can use DiscriminatorFormula:
// Base class
@DiscriminatorFormula("case when value in ('ACT','DNR','ATT') then 1
when 'OTH' then 2 else 3 end")
// Subclass
@DiscriminatorValue("1") // maps to ACT, DNR, ATT
A subclass has exactly 1 discriminator value.
You can add additional subclasses under the existing subclass for the extra discriminator values. Subclasses need not have additional properties or behavior.