We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$query->getCrtiteria()
It doesn't look like the getCriteria() method picks up relatedTo criteria set by the field name eg.
getCriteria()
relatedTo
$query->customFieldHandle(100); vs $query->relatedTo([ 'targetElement' => 100, 'field' =>'customFieldHandle' ]);
$query->customFieldHandle(100);
$query->relatedTo([ 'targetElement' => 100, 'field' =>'customFieldHandle' ]);
// $criteria array does NOT contain any relatedTo criteria $query = Entry::find(); $query->customFieldHandle(100); $criteria = $query->getCriteria();
// $criteria array does contain the relatedTo criteria $query = Entry::find(); $query->relatedTo([ 'targetElement' => 100, 'field' =>'customFieldHandle' ]); $criteria = $query->getCriteria();
The text was updated successfully, but these errors were encountered:
2536bd1
Good catch! Just fixed this for the next release.
Sorry, something went wrong.
Craft 3.5.17 is out now with this fix.
Fixed #7225
5a5a7e5
No branches or pull requests
Description
It doesn't look like the
getCriteria()
method picks uprelatedTo
criteria set by the field name eg.$query->customFieldHandle(100);
vs
$query->relatedTo([ 'targetElement' => 100, 'field' =>'customFieldHandle' ]);
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: