Added sensible defaults for keyForPolymorphicId and keyForPolymorphicType