Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Criteria merge #367

Open
wants to merge 4 commits into
base: 2.1.x
Choose a base branch
from

Conversation

TheDutchScorpion
Copy link

No description provided.

@SenseException
Copy link
Member

@TheDutchScorpion What's the reason to introduce this change and the use case you have?

@derrabus
Copy link
Member

derrabus commented May 3, 2023

@SenseException I think, the discussion happens on doctrine/orm#10640

->andWhere(self::expr()->andX(...array_filter([$leftCriteria->getWhereExpression(), $rightCriteria->getWhereExpression()])))
->orderBy(array_merge($leftCriteria->getOrderings(), $rightCriteria->getOrderings()))
->setFirstResult($rightCriteria->getFirstResult() ?? $leftCriteria->getFirstResult())
->setMaxResults($rightCriteria->getMaxResults() ?? $leftCriteria->getFirstResult());
Copy link

@OleksiiBulba OleksiiBulba Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheDutchScorpion, is it a typo or is it intended?

Suggested change
->setMaxResults($rightCriteria->getMaxResults() ?? $leftCriteria->getFirstResult());
->setMaxResults($rightCriteria->getMaxResults() ?? $leftCriteria->getMaxResults());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants