finished parsing and marshalling entity reference field logic