Skip to content

Alternative Check field associated entity and add missing fields#59

Open
bvkimball wants to merge 16 commits into
masterfrom
f/fix-associated-entity-fields-meta-alt
Open

Alternative Check field associated entity and add missing fields#59
bvkimball wants to merge 16 commits into
masterfrom
f/fix-associated-entity-fields-meta-alt

Conversation

@bvkimball

Copy link
Copy Markdown
Contributor

An alternative approach to parsing missing fields. Lots to discuss but check test cases to see approach:

      const meta: MetaService = new MetaService('EarnCodeGroup');
      const associatedEntity = { fields: [{ name: 'id' }] };
      meta.memory = {
        id: { name: 'id' },
        candidate: { name: 'candidate', associatedEntity },
        jobOrder: { name: 'jobOrder', associatedEntity },
      };
      const fields = ['id', 'payRate', 'candidate(id,name,address)', 'jobOrder(id,status,title)'];
      const res = meta.missing(fields);
      expect(res[0]).toBe('payRate');
      expect(res[1]).toBe('candidate(name,address)');
      expect(res[2]).toBe('jobOrder(status,title)');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants