Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA3
    • Fix Version/s: 2.0-BETA3
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      Win7

      Description

      There seems to be a bug in ORM/Query/expr.php method notIn. All literals should be quoted like:

          /**
           * Creates a NOT IN() expression with the given arguments.
           *
           * @param string $x Field in string format to be restricted by NOT IN() function
           * @param mixed $y Argument to be used in NOT IN() function.
           * @return Expr\Func
           */
          public function notIn($x, $y)
          {
              if (is_array($y)) {
                  foreach ($y as &$literal) { 
                      if ( ! ($literal instanceof Expr\Literal)) { 
                          $literal = $this->_quoteLiteral($literal);
                      }
                  }
              }
              return new Expr\Func($x . ' NOT IN', (array) $y);
          }
      

        Activity

        Hide
        Dietmar Bauer added a comment -

        Of course without "unknown macro" in the code!

        Show
        Dietmar Bauer added a comment - Of course without "unknown macro" in the code!
        Hide
        Benjamin Eberlei added a comment -

        this was fixed for the in() function already some time ago, good oversight

        Show
        Benjamin Eberlei added a comment - this was fixed for the in() function already some time ago, good oversight
        Hide
        Dietmar Bauer added a comment - - edited

        added

        { code }

        to description

        Show
        Dietmar Bauer added a comment - - edited added { code } to description
        Hide
        Benjamin Eberlei added a comment -

        fixed

        Show
        Benjamin Eberlei added a comment - fixed

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Dietmar Bauer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: