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

handle not given keys of find_existing_by-definitions as blank #42

Open
alexanderadam opened this issue Aug 5, 2014 · 2 comments
Open

Comments

@alexanderadam
Copy link

currently if I chose to set something like

options:
  find_existing_by: ['foo', 'bar', 'baz']

I have to provide all three keys even if I decide that one of the keys can be blank.

so instead of

records:
  - sprig_id: 1
    foo: bla
    bar: bla
    baz:

I would love to keep it

records:
  - sprig_id: 1
    foo: bla
    bar: bla

I hope I described it somehow clear!? 😉

@ltk
Copy link
Contributor

ltk commented Aug 5, 2014

I think I understand what you're describing. In short, you'd like attributes missing from the seed definition to have an assumed null value, correct?

I've tried the change on for size (https://github.com/vigetlabs/sprig/compare/find_existing_by_null?expand=1). I'm not sure how I feel about it at the moment. It feels a little bit like trading safety for convenience.

I'd like to take a few days to think on this and discuss it with some others. Do you have thoughts on this @efatsi?

@alexanderadam
Copy link
Author

exactly that's what I'm looking for 👍

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

No branches or pull requests

2 participants