Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Bug/Question - Custom User model extended adds new entry on update #18

Open
kkomaz opened this issue Mar 5, 2019 · 0 comments
Open

Comments

@kkomaz
Copy link
Contributor

kkomaz commented Mar 5, 2019

Currently on my application I have a model that extends the User model. Fetching and retrieving information is working properly however when I update an attribute it seems to generate a new document entry.

Works (no new entry)

https://github.com/kkomaz/debut/blob/user-profile-image/src/sagas/user/setUserAvatar.js#L9

  • Finding the user via User model
  • update and save
  • refetch via DebutUser with the extra attributes

Doesn't Work

https://github.com/kkomaz/debut/blob/user-profile-image/src/sagas/user/setUserAvatar.js#L8

  • find the user via debutUser model
  • update and save
  • Creates a new entry

I'm guessing it has to do with the wrapped modeling.

screenshot of opera 3-4-19 7-13-19 pm

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

No branches or pull requests

1 participant