getAll now takes into account subclasses