@@ -4931,12 +4931,10 @@ private function addJoinsForTables(ReflectedTable $t1, PathTree $joins, array &$
49314931 if ($ belongsTo ) {
49324932 $ fkValues = $ this ->getFkEmptyValues ($ t1 , $ t2 , $ records );
49334933 $ this ->addFkRecords ($ t2 , $ fkValues , $ params , $ db , $ newRecords );
4934- }
4935- if ($ hasMany ) {
4934+ } elseif ($ hasMany ) {
49364935 $ pkValues = $ this ->getPkEmptyValues ($ t1 , $ records );
49374936 $ this ->addPkRecords ($ t1 , $ t2 , $ pkValues , $ params , $ db , $ newRecords );
4938- }
4939- if ($ hasAndBelongsToMany ) {
4937+ } elseif ($ hasAndBelongsToMany ) {
49404938 $ habtmValues = $ this ->getHabtmEmptyValues ($ t1 , $ t2 , $ t3 , $ db , $ records );
49414939 $ this ->addFkRecords ($ t2 , $ habtmValues ->fkValues , $ params , $ db , $ newRecords );
49424940 }
@@ -4946,12 +4944,10 @@ private function addJoinsForTables(ReflectedTable $t1, PathTree $joins, array &$
49464944 if ($ fkValues != null ) {
49474945 $ this ->fillFkValues ($ t2 , $ newRecords , $ fkValues );
49484946 $ this ->setFkValues ($ t1 , $ t2 , $ records , $ fkValues );
4949- }
4950- if ($ pkValues != null ) {
4947+ } elseif ($ pkValues != null ) {
49514948 $ this ->fillPkValues ($ t1 , $ t2 , $ newRecords , $ pkValues );
49524949 $ this ->setPkValues ($ t1 , $ t2 , $ records , $ pkValues );
4953- }
4954- if ($ habtmValues != null ) {
4950+ } elseif ($ habtmValues != null ) {
49554951 $ this ->fillFkValues ($ t2 , $ newRecords , $ habtmValues ->fkValues );
49564952 $ this ->setHabtmValues ($ t1 , $ t3 , $ records , $ habtmValues );
49574953 }
0 commit comments