Skip to content

Conversation

@jdschleicher
Copy link
Owner

@jdschleicher jdschleicher commented Jul 4, 2025

Motivation and Context

When creating data recipes that are intended to be created an a target org, we need the ability to be able to create relationships between objects. This functionality is available using an convention of "Account_Reference_1" but this functionality is not documented and is a blind-faith approach to creating relationships between a child object and a parent object.

With this update we can now leverage the yaml property "nickname" on a parent object. When a child object needs to reference a parent to populate for a lookup or masterdetail field, it can provide the nickname as its value:

- object: Account
  nickname: ParentAccountNickname
  fields:
    Name: ${{ faker.company.name() }} 

- object: Contact
  fields:
    FirstName: ${{ ... }}
    LastName: ${{ ... }}
    AccountId: ParentAccountNickname

Any Technical Decisions to Note??

Introduced a convention when creating reference keys that will allow for pointing lookup fields to expected parent record ids using nickname or the incremental reference record ( "Account_Reference_1" )

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Other (please describe):

How Has This Been Tested?

  • Tested on Windows
  • Tested on macOS
  • Tested on Linux
  • Added new unit tests
  • Updated existing tests

Test Details

[Describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Changelog for branch: feature/nicknameAndReference

Generated on: 2025-07-04

Summary

  • Total commits: 3
  • Files added: 0
  • Files modified: 8
  • Files deleted: 0
  • Files renamed: 0

Changes at a glance

Added Files

Added File Commits History

Modified Files

Modified File Commits History
CHANGELOG.md 1 View Full History
src/treecipe/src/CollectionsApiService/CollectionsApiService.ts 1 View Full History
src/treecipe/src/CollectionsApiService/tests/CollectionsApiService.test.ts 2 View Full History
src/treecipe/src/FakerRecipeProcessor/FakerJSRecipeProcessor/FakerJSRecipeProcessor.ts 1 View Full History
src/treecipe/src/FakerRecipeProcessor/FakerJSRecipeProcessor/tests/FakerJSRecipeProcessor.test.ts 1 View Full History
src/treecipe/src/FakerRecipeProcessor/FakerJSRecipeProcessor/tests/mocks/FakerJSExpressionMocker.ts 1 View Full History
src/treecipe/src/FakerRecipeProcessor/SnowfakeryRecipeProcessor/SnowfakeryRecipeProcessor.ts 1 View Full History
src/treecipe/src/FakerRecipeProcessor/SnowfakeryRecipeProcessor/tests/SnowfakeryRecipeProcessor.test.ts 1 View Full History

Deleted Files

Deleted File Commits History

Renamed Files

Old Path New Path Commits History

@jdschleicher jdschleicher marked this pull request as ready for review July 4, 2025 21:18
@jdschleicher jdschleicher merged commit fca2a2f into main Jul 4, 2025
2 checks passed
jdschleicher added a commit that referenced this pull request Jul 5, 2025
#27 (#28)

* feat: concating nickname and unique reference id to allow for using nicknames and reference ids to drive the connection of look up references within recipes

* feat: replacement of reference values that may be incremental record key or based off nickname using expected underscore split convention

* docs: initial change log adjustments for new feature

* docs: change log update with example of nickname usage

* build: incrementing minor version number

* docs: update to pull request template to remember version update
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.

1 participant