-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
User.findOrCreate is not a function #69
Comments
HI @Arunps94, |
Hi, |
hey , |
By simply installing mongoose-findorcreate (npm package) ,requiring it in your app.js and adding it as a plugin in your schema would make this function work as it is! |
@Arunps94 Can you please close this issue? It doesn't seem to be related to this library at all. Thanks! |
See, This is not a method of mongoose it is actually a npm package named "mongoose-findOrCreate". You have to install and require it on your project inorder to use this. Actually under this package there are two mongoose methods have implemented by the developers which are findOne() and save() and they have bounded these two methods on this package. |
** READ THIS FIRST! **
Are you looking for help?
Reminder: The issue tracker is not a support forum.
Issues should only be filed in this project once they are able to be reproduced
and confirmed as a flaw in the software or incorrect information in associated
documention.
If you are encountering problems integrating this module into your application,
please post a question on the discussion forum
rather than filing an issue.
Is this a security issue?
Do not open issues that might have security implications. Potential security
vulnerabilities should be reported privately to jaredhanson@gmail.com. Once any
vulerabilities have been repaired, the details will be disclosed publicly in a
responsible manner. This also allows time for coordinating with affected parties
in order to mitigate negative consequences.
If neither of the above two scenarios apply to your situation, you should open
an issue. Delete this paragraph and the text above, and fill in the information
requested below.
Expected behavior
Actual behavior
Steps to reproduce
// Format code using Markdown code blocks
Environment
The text was updated successfully, but these errors were encountered: