@@ -35,11 +35,12 @@ discard block |
||
35 | 35 | $filter[] = ['doc.'.$attribute, '!=', 'null']; |
36 | 36 | } |
37 | 37 | |
38 | - $aqb = AQB::for('doc', $collection) |
|
39 | - ->filter($filter) |
|
38 | + $aqb = AQB::for('doc', $collection) { |
|
39 | + ->filter($filter) |
|
40 | 40 | ->limit(1) |
41 | 41 | ->return('true') |
42 | 42 | ->get(); |
43 | + } |
|
43 | 44 | |
44 | 45 | $command->aqb = $aqb; |
45 | 46 | |
@@ -65,8 +66,8 @@ discard block |
||
65 | 66 | ['doc.'.$command->to], |
66 | 67 | ]; |
67 | 68 | |
68 | - $aqb = AQB::for('doc', $collection) |
|
69 | - ->filter($filter) |
|
69 | + $aqb = AQB::for('doc', $collection) { |
|
70 | + ->filter($filter) |
|
70 | 71 | ->update( |
71 | 72 | 'doc', |
72 | 73 | [ |
@@ -76,6 +77,7 @@ discard block |
||
76 | 77 | $collection) |
77 | 78 | ->options( ['keepNull' => true]) |
78 | 79 | ->get(); |
80 | + } |
|
79 | 81 | |
80 | 82 | $command->aqb = $aqb; |
81 | 83 | |
@@ -101,11 +103,12 @@ discard block |
||
101 | 103 | $filter[] = ['doc.'.$attribute, '!=', 'null', 'OR']; |
102 | 104 | $data[$attribute] = 'null'; |
103 | 105 | } |
104 | - $aqb = AQB::for('doc', $collection) |
|
105 | - ->filter($filter ) |
|
106 | + $aqb = AQB::for('doc', $collection) { |
|
107 | + ->filter($filter ) |
|
106 | 108 | ->update('doc', $data, $collection) |
107 | 109 | ->options(['keepNull' => false]) |
108 | 110 | ->get(); |
111 | + } |
|
109 | 112 | |
110 | 113 | $command->aqb = $aqb; |
111 | 114 |