InheritanceType.JOINED without own subtable

Hi. I needed to map 4 classes into 3 tables.

Tables:

DATA_TYPE
id number;
name varchar2;
supertype_id number;
OBJECT_TYPE
type_id number (foreign key to DATA_TYPE.id)
desc varchar2;
PROP
id number;
obj_type_id number (foreign key to OBJECT_TYPE.type_id)
name varchar2;

Classes:

@Entity
@Table(name = "DATA_TYPE")
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "supertype_id")
public abstract class DataType {

    private Long id;
    private String name;

    @Id
    @Column(name = "ID")
    @GeneratedValue
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
@Entity
@DiscriminatorValue("2")
public class SimpleType extends DataType {
}
@Entity
@DiscriminatorValue("8")
@Table(name = "OBJ_TYPE")
@PrimaryKeyJoinColumn(name = "TYPE_ID")
public class ObjectType extends DataType {

    private String description;
    private List<Prop> properties;

    @Column(name = "desc", table = "OBJ_TYPE")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @OneToMany(mappedBy = "objectType", cascade = CascadeType.ALL, orphanRemoval = true)
    public List<Prop> getProperties() {
        return properties;
    }

    public void setProperties(List<Prop> properties) {
        this.properties = properties;
    }
}
@Entity
@Table(name = "PROP")
public class Prop {

    private Long id;
    private String name;
    private ObjectType objectType;

    @Id
    @Column(name = "ID")
    @GeneratedValue
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @JoinColumn(name = "OBJ_TYPE_ID",
            referencedColumnName = "TYPE_ID",
            foreignKey = @ForeignKey(
                    name = "PROP_OBJ_FK",
                    value = ConstraintMode.CONSTRAINT
            ))
    @ManyToOne(targetEntity = ObjectType.class)
    public ObjectType getObjectType() {
        return objectType;
    }

    public void setObjectType(ObjectType objectType) {
        this.objectType = objectType;
    }
}

But when i tried to setup this configuration, it breaks, because it could not find table for SimpleType. Is it possible to avoid it?

Addition to the question:
When we use “DataType.hbm.xml” for mapping it works fine.
But when we use annotations for mapping it does not work.

DataType.hbm.xml:

<class name="DataType" table="DATA_TYPE" abstract="true" lazy="false" >
    <id name="id" column="ID" type="long">
        <generator class="native">
            <param name="sequence_name">SEQ</param>
        </generator>
    </id>
    <discriminator formula="SUPER_TYPE_ID"/>
    <property name="supertypeId" column="SUPER_TYPE_ID"/>
    <property name="name" column="NAME"/>
    
    <subclass name="SimpleType" discriminator-value="2"/>

    <subclass name="ObjectType" discriminator-value="8">
        <property name="description" column="desc"/>
        <set name="properties" table="PROP" inverse="true" cascade="all-delete-orphan">
            <key>
                <column name="OBJ_TYPE_ID" />
            </key>
            <one-to-many class="Prop" />
        </set>
        <join table="OBJ_TYPE">
            <key column="TYPE_ID"/>
        </join>
    </subclass>

</class>

<class name="Prop" table="PROP">
    <id name="id" column="ID" type="long">
        <generator class="native">
            <param name="sequence_name">SEQ</param>
        </generator>
    </id>
    <property name="name" column="NAME"/>
    <many-to-one name="objectType" class="ObjectType" column="OBJ_TYPE_ID" fetch="join"/>
</class>

Did you try to add @Table(name = "DATA_TYPE") to SimpleType? If that doesn’t work, please create an issue in the issue tracker(https://hibernate.atlassian.net) with a test case(https://github.com/hibernate/hibernate-test-case-templates/blob/master/orm/hibernate-orm-5/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java) that reproduces the issue.

I created an issue in the issue tracker with that problem. [HHH-14526] Problem with InheritanceType.JOINED without own subtable - Hibernate JIRA

Please vote for created issue in the tracker [HHH-14526] Problem with InheritanceType.JOINED without own subtable - Hibernate JIRA