Inheritance of JPA entity

Hi,

I have many JPA entity with same attribute. For each JPA entity I have to create these sample attribute again and again.

Is there a way were I can create in a single class and let other class inherit the property without using association or composition.

Also, the parent JPA entity does not need primary key or unique id column. It should only contain the common property which some or all JPA entity require.

Also, changelog should be created for child table for the inherited property. Meaning, property inherited from the parent table should be created as columns in the table for the child table.

Parent JPA entity should not be created as a table in database.

Thanks in advance.

This does not sound like a Jmix-related issue at all and therefore does not really belong in this forum.

However Jpa offers different mechanisms, I think @MappedSuperclass might be most suitable for you.

1 Like