-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Extra user details: in user schema, or a different schema? #1689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've done it both ways, they both work fine. The generator is definitely set up to include additional user attributes in the schema, then add then to the User and Auth services for manipulation. My problem was I tried it a few times, made a mistake, then I couldn't authenticate my users at all. But certainly if you do it carefully, I think using the user schema would be preferred. |
i have found this interesting project, Drywall, http://jedireza.github.io/drywall/ |
but how to connect these 2? |
When I set up the separate model, I had a field for user id, which is self explanatory. Then I looked it up based on this.getCurrentUser()._id. The danger here is ending up with duplicate entries for the same user, so you'll either have to check for that, or place a unique index on your database for the user id field. |
Having two separate model, one for the account and another for the user could be an answer to the multiple social account issue (#1681 or #359). |
Users are important part of my app. they have tons of information.
address, phones, location, bio, etc.
Should i add all this to the user schema, or create a separate schema/table for that, and reference back to user schema?
as always, any link to discussion, blog, example, tutorial, is much appreciated.
The text was updated successfully, but these errors were encountered: