-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Eager loading not working at all #103
Comments
Hyper links can't be eager loaded, as they aren't elements. If we're talking about eager loading through a Hyper field to any custom fields on a link, that's not supported. If the Hyper link refers to an element like an Entry, that's already heavily cached, and there shouldn't be any performance hits with n+1 queries. Hyper already knows the link information, so there's no performant impact to "fix" with eager loading |
That's quite interesting to see, last I checked things were nowhere near that different! Just to confirm - are you testing with a single link, linked to an Entry? There are by nature going to be more database queries, as Hyper fields use field layouts for custom fields, whereas any other link plugin doesn't do this, but that should be roughly the only difference. |
There should be about 20 link fields in total. Distributed over the navigation and a "content builder" matrix field. All links are of type entry |
Sorry for my late reply.
|
Describe the bug
It looks like eager loading for hyper fields won't work at all.
The following query as an example,
link
is the hyper fieldResults in the following error:
Method craft\elements\ElementCollection::url does not exist.
Steps to reproduce
Craft CMS version
Craft Pro 4.5.11
Plugin version
1.1.16
Multi-site?
Yes
Additional context
No response
The text was updated successfully, but these errors were encountered: