Hi!
I have a simple Page with a many_many relation to a DataObject(s)
class FooPage extens Page {
...
static $many_many = array (
'MyFooObject' => 'FooObject'
);
...
}
Now I want to query Pages for display using FooPage::get() and then ->filter() it using the related object(s).
I want to return only Pages that have one or more related objects. Their content does not matter at all. I want to refuse Pages without a related object.
My SQL (and SilverStripe for that matter) experience is not too broad and so I cannot figure out how to do that. It seems trivial enough but I cannot find anything in the documentation.
Help is much appreciated!