Hi!
I have and entity (base) not in public DB scheme
Also I have inherited entitiy (child) stored in the same table.
Now I have one more entity(another) with FK to child entity.
It seems that JMIX plugin ignores inheritance strategy during liquibase script generation as FK points to target table in PUBLIC schema.
Here is example to reproduce
@JmixEntity
@Entity(name = "tst_Base")
@Table(name = "ENTITY", schema = "TST")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(discriminatorType = DiscriminatorType.STRING)
public abstract class BaseEntity
@JmixEntity
@Entity(name = "tst_Child")
@DiscriminatorValue(value = "Child")
public class ChildEntity extends BaseEntity
@JmixEntity
@Table(name = "ANOTHER_ENTITY", schema = "ANOTHER")
@Entity(name = "another_AnotherEntity")
public class AnotherEntity {
@OneToOne(optional = false)
@JoinColumn(name = ENTITY_ID, nullable = false)
@NotNull
private ChildEntity childEntity;
And generated liquibase script looks like
<changeSet id="33" author="tst">
<addForeignKeyConstraint baseColumnNames="ENTITY_ID" baseTableName="ANOTHER_ENTITY"
baseTableSchemaName="ANOTHER" constraintName="FK_ANOTHER_ENTITY_ON_CHILD_ENTITY"
referencedColumnNames="ID" referencedTableName="ENTITY" />
</changeSet>
So attribute referencedTableSchemaName is absent