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

Make helper that check for record existence throw informative errors #30

Open
asishallab opened this issue Apr 22, 2020 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@asishallab
Copy link
Member

Currently the helper functions

  • checkExistence and
  • assocArgsAreExistingIDs
    return a boolean value.

Change that. The above functions should stop execution immediately if they find an ID in the argument Array that refers to a non existing record. An informative Error should be thrown in this case:
ID ${currId} has no existing record in data model ${model.definition.model}

Change names of the helper functions so they remain informative:

  • checkExistence -> validateExistence
  • assocArgsAreExistingIDs -> validateAssociationArgsExistence
@asishallab asishallab added the enhancement New feature or request label Apr 22, 2020
@asishallab
Copy link
Member Author

Track name change also in our spec.

@tmvoe
Copy link

tmvoe commented Apr 22, 2020

As discussed, checkExistence was renamed as filterOutIdsNotInUse to better match the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants