Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix foreign key validation with arrays of file names #467

Merged
merged 4 commits into from
May 5, 2023

Conversation

rmattos500
Copy link
Contributor

It was recently discovered that even though we can specify an array of file names in the foreignKey property of our mvom schemas to validate the foreign key against, it is only ever validating against the first file. This PR changes the file name/entity name separator character from a , to a # since when an array of file names gets transformed to a string it inserts commas between each of them. Thus, when performing splitting logic later on in the process flow, it was not working correctly. After making this change the file names, were correctly split from the entity name, but additional splitting was needed to split each of the file names back into an array to pass to the u2 subroutine.

Copy link
Member

@kthompson23 kthompson23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the one comment now being out dated. If it looks good, just accept my suggestion.

src/Document.ts Outdated Show resolved Hide resolved
Co-authored-by: Ken Thompson <kat@storis.com>
@rmattos500
Copy link
Contributor Author

That's really cool that it allows you to just accept a suggestion like that. I accepted it, thanks!

Copy link
Member

@kthompson23 kthompson23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you.

@kthompson23 kthompson23 merged commit fa8ab31 into main May 5, 2023
@kthompson23 kthompson23 deleted the fix-fk-validation-with-arrays-of-file-names branch May 5, 2023 18:04
@shawnmcknight shawnmcknight changed the title CXM-5384 Fix fk validation with arrays of file names Fix foreign key validation with arrays of file names May 5, 2023
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.

2 participants