File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ public function saveAll()
8181 /* @var $this ActiveRecord */
8282 $ db = $ this ->getDb ();
8383 $ trans = $ db ->beginTransaction ();
84+ $ isNewRecord = $ this ->isNewRecord ;
8485 try {
8586 if ($ this ->save ()) {
8687 $ error = 0 ;
@@ -127,7 +128,7 @@ public function saveAll()
127128 }
128129 $ i ++;
129130 }
130- if (!$ this -> isNewRecord ) {
131+ if (!$ isNewRecord ) {
131132 //DELETE WITH 'NOT IN' PK MODEL & REL MODEL
132133 if ($ isManyMany ) {
133134 $ compiledFields = implode (", " , array_keys ($ fields ));
@@ -170,8 +171,7 @@ public function saveAll()
170171 }
171172 } else {
172173 //No Children left
173- //echo "No Children left";
174- if (!$ this ->isNewRecord ) {
174+ if (!$ isNewRecord ) {
175175 $ relData = $ this ->getRelationData ();
176176 foreach ($ relData as $ rel ) {
177177 /* @var $relModel ActiveRecord */
You can’t perform that action at this time.
0 commit comments