Fixed a caching bug in ORMTable when dealing with persistence of polymorphic types.