angular / in-memory-web-api

The code for this project has moved to the angular/angular repo. This repo is now archived.
MIT License
1.18k stars 232 forks source link

feat: allow objects with no ids to be added to an empty collection #183

Closed digitalpardoe closed 5 years ago

digitalpardoe commented 6 years ago

Whilst issues caused by the current functionality, https://github.com/angular/angular/issues/22623 or #162 for example, can be solved through the use of a custom genId it strikes me that most developers who use in-memory-web-api will:

  1. Be sufficiently experienced or dealing with a level of complexity from the start that they already generate IDs using genId
  2. Have made the conscious decision to allow in-memory-web-api to generate their IDs
  3. Be inexperienced enough (in the case of the tutorial followers especially) that it causes unexpected issues which in turn breaks their flow as they chase down a fix

In the case of 1 this PR changes nothing and in the cases of 2 and 3 it improves the functionality and developer experience.

googlebot commented 6 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
digitalpardoe commented 6 years ago

I signed it!

googlebot commented 6 years ago

CLAs look good, thanks!

tonivj5 commented 6 years ago

any news with this?

wardbell commented 5 years ago

I'm sorry but I do not see that this PR addresses the concern in issue #162 nor does it change the functionality in any way. It seems to simply spread the decision logic over two functions where one sufficed before.

Please explain what I am missing.

digitalpardoe commented 5 years ago

I'm closing the PR as it hasn't been addressed for six months and I'm no longer in a position where I have availability to discuss it further.

If someone else would like to pick it up then you're more than welcome.