Skip to content

Conversation

@bvkimball
Copy link
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