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

Feature: Generic Service For Associative Table #9

Open
harpocrates12 opened this issue Mar 15, 2019 · 2 comments
Open

Feature: Generic Service For Associative Table #9

harpocrates12 opened this issue Mar 15, 2019 · 2 comments

Comments

@harpocrates12
Copy link
Contributor

harpocrates12 commented Mar 15, 2019

It would be nice to have a generic service that:

  • receives an array of requested id_pairs (like used in associative tables)
PPPT::Simple::Plural::DeleteInsert.new.call(
  [
    { some_id: 1, some_other_id: 2},
    { some_id: 1, some_other_id: 3},
  ]
)

And takes care of:

  • finding existent records
  • infer outdated records and delete them
  • infer new 'records' and insert them
@harpocrates12
Copy link
Contributor Author

@mull descriptive enough?

@harpocrates12
Copy link
Contributor Author

harpocrates12 commented Mar 15, 2019

I guess there is an underlying assumption in this behaviour that whenever called the service will be provided with all currently relevant id_pairs.

Not sure if that is an issue or if it is sufficient to make that assumption explicit with the service name/description.

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

1 participant