DDC-1493: Improving in() from ExpressionBuilder #2122

Open
doctrinebot opened this Issue Nov 15, 2011 · 0 comments

2 participants

@doctrinebot

Jira issue originally created by user h-andreas:

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'))
);
@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment