Hi everybody,
I have a datamodel that looks pretty much like this:
class Lead extends DataObject{
private static $db = array(
....
);
private static $many_many = array(
'Types' => 'Type'
);
}
class Type extends DataObject{
private static $db = array(
'Name' => 'Varchar(255)'
);
private static $belongs_many_many = array(
'Leads' => 'Lead'
);
}
Is it possible to do a sort on the Types?
Something like this?
Lead::get()->sort("Types.Name ASC");
Appreciate any help, thanks.
Joel