In the ChildInstanceMethods::save method, each inherited object's type is set via a SQL UPDATE query after all other data has already been INSERTed. So in a simple example where Driver extends Person, there are two extra UPDATEs that occur after each of these tables has data INSERTed.
It seems that the type could (arguably should) be included in the original INSERT statement since we already know what the type value is, and it's not being generated as a result of the inserts.
Additionally, this would allow non-transactional databases (e.g.: MySQL's MyISAM) to define the type column as non-nullable, which would improve general query performance against the table.
In the
ChildInstanceMethods::save
method, each inherited object'stype
is set via a SQL UPDATE query after all other data has already been INSERTed. So in a simple example whereDriver
extendsPerson
, there are two extra UPDATEs that occur after each of these tables has data INSERTed.It seems that the
type
could (arguably should) be included in the original INSERT statement since we already know what the type value is, and it's not being generated as a result of the inserts.Additionally, this would allow non-transactional databases (e.g.: MySQL's MyISAM) to define the
type
column as non-nullable, which would improve general query performance against the table.