I'd say just loop the related-objects array and create a new array and fill it with the object you want:
(pseudo code)
$myFilteredRelatedObject=array();
foreach($relatedObjects as $related)
{
if($related->attribute('class_identifier')=='my_class_id')
{
$myFilteredRelatedObject[]=$related;
}
}//$myFilteredRelatedObject contains the filtered objects.
off course this is pseudo code, but something like this should work (and yes.. I know that your approch is 'cleaner'.. but don't have any ez code here.. so can't check the ez classes.. that's why my answer is probably incomplete).
Good luck! Clemens
You must be logged in to post messages in this topic!