Closed itbirds closed 5 years ago
调用内容如下: $this->testDAO->merge(['id'=>1,'is_del'=>1])->update(['test'=>1111]);
框架调用过程如下:
2.SingleFilter类继承Filter类,实例化传的参数调用的是Filter里面的构造方法
elseif (is_array($filter)){ if ($cond){ $this->conds = [[$type => [$cond, [$link=>[[self::valueKey => $filter]]]]]]; } else { $this->conds = [[$link => [[self::valueKey => $filter]]]]; } }
问题是:$cond没有传值是null,所以走else判断,直接走了link变量的值,但是link默认是and,而且构造方法并未传这个参数值
的确是个bug 非常感谢 已修复
没事不客气
调用内容如下: $this->testDAO->merge(['id'=>1,'is_del'=>1])->update(['test'=>1111]);
框架调用过程如下:
2.SingleFilter类继承Filter类,实例化传的参数调用的是Filter里面的构造方法
elseif (is_array($filter)){ if ($cond){ $this->conds = [[$type => [$cond, [$link=>[[self::valueKey => $filter]]]]]]; } else { $this->conds = [[$link => [[self::valueKey => $filter]]]]; } }
问题是:$cond没有传值是null,所以走else判断,直接走了link变量的值,但是link默认是and,而且构造方法并未传这个参数值