Added preliminary tested support for polymorphic ORM functionality.