silverstripe / developer-docs

Developer documentation for Silverstripe CMS
Other
6 stars 57 forks source link

Misleading docs about querying many_many through join data #507

Closed GuySartorelli closed 1 month ago

GuySartorelli commented 1 month ago

In the CMS 4 docs it says

In order to filter on the join table during queries, you can use the class name of the joining table for any sql conditions.

This is just outright wrong - you have to use the table name, not the class name.

In the CMS 5 docs it says

You can filter on the relation by the extra fields automatically, assuming they don't conflict with names of fields on other tables in the query.

But there is no advice on what to do if they do conflict.

PRs