Mapping duplicated the functionality of Field::$actual, so we drop the WITH mapping from model completely.
Mapping was also used for filtering wanted columns, we drop it as it mutated the source model state and DB query optimizer should be smart enough to prune the unneded columns. Later, we should optimize them away automatically. Alternatively, you can set Model::$onlyFields for the added CTE model manually.
Also, the method was renamed from Model::addWith to Model::addCteModel and name/alias is now accepted as the 1st param.
Mapping duplicated the functionality of
Field::$actual
, so we drop the WITH mapping from model completely.Mapping was also used for filtering wanted columns, we drop it as it mutated the source model state and DB query optimizer should be smart enough to prune the unneded columns. Later, we should optimize them away automatically. Alternatively, you can set
Model::$onlyFields
for the added CTE model manually.Also, the method was renamed from
Model::addWith
toModel::addCteModel
and name/alias is now accepted as the 1st param.