-
Notifications
You must be signed in to change notification settings - Fork 230
add feature to choose the property name of the primary key of collection #159
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
I signed it! |
Arf maybe I should create my merge request on more-dev branch instead of master.. |
I think this is a good idea. It's an extension I've wanted myself and had intended to do something like this and along the lines of the id handling in I don't know when or if it will happen. I'm keeping your PR around as a reminder of what could be. You may want to fork this library for your own needs. |
Based on the model of
createDb
method on theinMemDbService
in theBackendService
, it's possible to define on the Service the methoddefineId
which takes the collection name in parameter and returns the property name of the key.By default, the behaviour of the component still unchanged since if the method is not defined the whole collections used the
id
name.It is useful to link to an existing model domain
specifications is added
raw Angular Http w/ override id service
can get heroes
can get heroes by uuid