make get all rows work for polymorphic and virtual tables as well