/**
* @Entity
*/
#[Entity]
class Person
{
/** @Column(type="primary", name="id") */
#[Column(type: 'primary', name: 'id')]
protected int $foo_id;
/** @Column(type="string") */
#[Column(type: 'string')]
public string $type;
}
After that, I created the Buyer entity and extended it from Person, added an index to the index_id column. But the index is trying to add to the people table, which is related to the Person entity.
/**
* @Entity
* @Index(columns={"index_id"}, unique=true)
* @InheritanceJoinedTable
*/
#[Entity]
#[Index(columns: ['index_id'], unique: true)]
#[InheritanceJoinedTable]
class Buyer extends Person
{
/** @Column(type="integer") */
#[Column(type: 'integer')]
private int $index_id;
}
When adding an index on a child table in JTI, it tries to add to the parent table.
In the branch, I created the test.
For example, I created Entity Person:
After that, I created the Buyer entity and extended it from Person, added an index to the index_id column. But the index is trying to add to the people table, which is related to the Person entity.