I’ve table A and B, joined by a table C with many_many relations.
That is, A has many_many B’s.
In A I’ve defined my relation.
I need to create a listData with optgroups key, which should be something like this
SELECT a.description, b.description, b.code FROM a JOIN b ON (..) ORDER BY a.description, b.description
I should be able to do this in one shot using findAll and listData, which supports optgroups, but cannot understand how!