allow polymorphic type and id fields to be specified