Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Cannot set 'or' condition for $_conditions.
  • I would like to create something below

    class Model_Test extends \Orm\Model
    protected static $_conditions = [
    'where' => [
    [ [ 'deleted' => null ], 'or' => [ 'deleted', 0 ] ],

    But I cannot get correct result.
    So I read source code and, I think default condition should be treated with _parse_where_array() instead of where() in Query class.

    or any reason to avoid ?


  • or 
    Orm\Query::where() should use _parse_where_array() if the first argument is array

    public function where()
    $condition = func_get_args();
    if (is_array(reset($condition)))
    return $this->_parse_where_array(reset($condition));
    return $this->_where($condition);
  • oh, $_conditions['where'] parameter is also used in update statement through build_query()..
    I think I misunderstand how it works..
  • HarroHarro
    Accepted Answer
    This is something to be looked at. Please create a feature request for it at

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion