Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1493

Improving in() from ExpressionBuilder

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.2
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      Instead of this piece of code:

      $literal = $expr->literal($v);
      $expr->andX(
        $expr->eq('at.key', $expr->literal($k)),
        $expr->orX(
          $expr->eq('a.valueInt', $literal),
          $expr->eq('a.valueText', $literal),
          $expr->eq('a.valueDate', $literal)
        )
      );
      

      I would like to simplify my query by using this syntax:

      $expr->andX(
        $expr->eq('at.key', $expr->literal($k)),
        $expr->in($expr->literal($v), array('a.valueInt', 'a.valueText', 'a.valueDate'))
      );
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Andreas Hörnicke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: