Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

add feature to choose the property name of the primary key of collection #159

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cHullaert
Copy link

@cHullaert cHullaert commented Dec 7, 2017

Based on the model of createDb method on the inMemDbService in the BackendService, it's possible to define on the Service the method defineId 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

@googlebot
Copy link

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. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@googlebot
Copy link

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.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@cHullaert
Copy link
Author

I signed it!

@cHullaert
Copy link
Author

Arf maybe I should create my merge request on more-dev branch instead of master..

@wardbell
Copy link
Contributor

wardbell commented Nov 1, 2018

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 @ngrx/entity.

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants