i want to save a model object that contains a list of instances typed with an abstract type which can be more than one concrete type.

this is the model:

class Model {
    private final Collection<AbstractType> types = new ArrayList<>();
interface AbstractType {
class ConcreteType implements AbstractType {
class OtherConcreteType implements AbstractType {

i have got to know that jpa cant save interfaces, so i need some mapping.

but i have no good idea how to map such stuff.

could you give me a hint?