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

Ignore limit if no order exists when building subquery #16008

Merged
merged 1 commit into from Oct 9, 2021

Conversation

othercorey
Copy link
Member

@othercorey othercorey commented Oct 5, 2021

Fixes #14480

@othercorey othercorey added this to the 4.2.10 milestone Oct 5, 2021
@othercorey othercorey marked this pull request as ready for review October 5, 2021 18:04
if (in_array($result->name, ['mariano', 'lary'])) {
$this->assertNotEmpty($result->articles);
} else {
$this->assertEmpty($result->articles);
Copy link
Member Author

Choose a reason for hiding this comment

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

This depends on the db since there is no order. Hard to force a result in the middle of these unit tests.

@othercorey
Copy link
Member Author

This doesn't fail without the fix. Not sure I can create a scenario that always tests this.

#16010

->contain('Articles')
->first();

if (in_array($result->name, ['mariano', 'lary'])) {
Copy link
Member

Choose a reason for hiding this comment

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

Should this be larry not lary

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Still can't get it to fail in unit test.

@othercorey
Copy link
Member Author

Any ideas for consistent unit tests or should we just commit and know it works?

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

Successfully merging this pull request may close these issues.

Can't find all translations for a single entity
2 participants