The inverses from the Hibernate metadata seem not to be working.
With the following beans:
@Entity @Table(name="tb_worker_company") @DiscriminatorFormula("CASE WHEN belongs_worker_company = 1 THEN 1 ELSE 0 END") public class WorkerCompany
and logic
@Entity @DiscriminatorValue("0") public class WorkerCompanyNotBelongs extends WorkerCompany
the result is the attached stack trace.
Anonymous
Diff: