public function assignedToActor($actor)
    {
        $actortype = $actor->getEntityDescription()->getInheritanceColumnValue()->getIdentifier();
        $this
             //either assigned to the actor
             ->where('assignments.actor', '=', $actor)
             //or assiged to its type with global or optional
             ->where('(@col(assignments.actortype) = @quote('.$actortype.') AND @col(assignments.access IN (2,1) ))', 'OR')
        ;

        return $this;
    }