allow polymorphic type and id fields to be specified

allow polymorphic type and id fields to be specified