added support for reading by Type and by Key (i.e. all subIds)