You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: STI child of a JTI entity is merged into the root table and drops the parent's columns #144
An STI child of a JTI entity lands in the wrong table and wipes the JTI parent's columns. With Square → Polygon → Shape, where Shape declares #[JoinedTable] and Polygon declares #[SingleTable], Square is merged into the root shapes table instead of polygons, and removeStiExtraFields() then drops Polygon's columns from it.
Is this a regression?
Not checked.
To Reproduce
Declare Shape with #[JoinedTable], Polygon extends Shape with #[SingleTable] and its own columns, and Square extends Polygon.
Compile the schema with TableInheritance.
Square is mapped to shapes, and Polygon's columns are missing.
Expected behaviour
Square shares the polygons table with Polygon (STI within the JTI child), and Polygon keeps its columns.
Media prove
Not applicable.
Database
All of them (schema compilation, before any SQL).
Your environment
cycle/annotated 4.x, src/TableInheritance.php.
Additional context
Found while killing escaped mutants in #142. The mutants on lines 91, 154, 218 and 220 of TableInheritance.php only differ in this case, so they still survive. Possibly related to the closed #67 (JTI parent has children fields).
Activity