super-table
super-table copied to clipboard
Can't order by an entry field title
Describe the bug
Is it possible to order supertable blocks by the title of an entry field?
First I've tried to do entry.ffE.orderBy('material.title').all()
but I get an error saying Unknown column 'material.title' in 'order clause' which makes sense since it's not in the query. I've also tried to eager load the material field and see if I can filter by the column without luck.
Any ideas? Thanks
Steps to reproduce
Add an entry field into a super table field and try to order by it
Craft CMS version
4.3.6.1
Plugin version
3.0.7
Multi-site?
No response
Additional context
No response
@goraxan - did you ever find a solution to this? I'm having a similar issue.
@daniellelecomte a workaround was to create a calculated field which has the same value as the related entry title, and order by that field. It's not ideal but works.