added polymorphic references support and added getByClass to hub