Base object subtyping on the inheritance hierarchy