I have table in sql like this:
id = 1, type = 1, description = "something"
id = 2, type = 1, description = "something else"
id = 1, type = 2, description = "another class"
id = 2, type = 2, description = "something"
I would like to make two classes which inherit from the same class. And discriminator should be type. The problem is that id can be repeated for each of the subtypes.
When I have association @ManyToOne with other class Hibernate don’t use type, only the id.
or