17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2102 Views |
-
Sorting within a many_many-relation

6 February 2008 at 4:49am
Hi there,
I probably have got a really novice question, but I wasn't able to find anything about that:
How can I sort the output of a n:n-relation? I my specific case I've got a catalog, including categories and products. Each product can be assigned to multiple categories.
It is no problem to sort a 1:n-relation via DataObject::get(...). But using the n:n-relation, there is one more table to manage and I don't know, how to include it into my query.
Steven
-
Re: Sorting within a many_many-relation

6 February 2008 at 11:12pm
ok, I fixed it by redeclaring the JOIN-Term.
I was trying to (re)use that JOIN, silverstripe is extracting out of the relation-definition.Steven
| 2102 Views | ||
|
Page:
1
|
Go to Top |

