I've a many-to-many relation set up. I've tried two approaches to work with eager loading, but can't figure it out.
- This approach works, but not sure how I can apply eager loading for this:
craft.entries.section('relatedSection').relatedTo(entry).all()
// Result ok but doesn't pair with eager loading
- But have trouble with this one, while this might support eager loading:
entry.relatedSectionFieldName
// Result empty
For the regular relation, this last approach does work.
I've a many-to-many relation set up. I've tried two approaches to work with eager loading, but can't figure it out.
entry.relatedSectionFieldName // Result emptyFor the regular relation, this last approach does work.