Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Doesn't support using a function in getIdAttribute #30

Open
lingard opened this issue Nov 1, 2016 · 2 comments
Open

Doesn't support using a function in getIdAttribute #30

lingard opened this issue Nov 1, 2016 · 2 comments
Labels

Comments

@lingard
Copy link

lingard commented Nov 1, 2016

Normalizr allows you to pass a function to idAttribute instead of a string but as denormalizr seems to assume that the returned value from schema.getIdAttribute is a string it won't work.

id = getIn(entity, [schema.getIdAttribute()]);

I guess I could work around this issue by plucking the id attributes from my objects before denormalizing but that doesn't feel optimal...

@gpbl gpbl added the bug label Nov 3, 2016
@gpbl
Copy link
Owner

gpbl commented Nov 3, 2016

Thanks @lingard I wasn't aware it could be a function. Working on this in the next days if you won't send a PR first 😄

@brunolemos
Copy link
Contributor

I think #35 fixed it. @lingard can you try?

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

No branches or pull requests

3 participants