Books can have many categories. Categories can have many books.
I'd like to return a list of books from a specific category.
I have Book.php (extends Page), Category.php (extends DataObject).
$whereStatement = "CategoryID ='". $categoryID ."'";
return DataObject::get("Books", $whereStatement); // Do I replace DataObject with ComponentSet?
The [url="http://doc.silverstripe.com/doku.php?id=componentset&s=componentset"]ComponentSet page[/url] in the documentation doesn't explain much.
I read that ComponentSet has to do with Many_Many relationships.
Any examples are greatly appreciated!