-
Notifications
You must be signed in to change notification settings - Fork 2k
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
How to get inserted record from .create() #7071
Comments
@galih56 Thanks for posting! We'll take a look as soon as possible. In the mean time, there are a few ways you can help speed things along:
Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly. For help with questions about Sails, click here. |
Hi @galih56, you don't need
Hope that helps! |
it certainly helped me, thank you so much!! |
Node version: 6.14.8
"sails": "^1.2.5",
"sails-hook-apianalytics": "^2.0.3",
"sails-hook-organics": "^2.0.0",
"sails-hook-orm": "^2.1.1",
"sails-hook-sockets": "^2.0.0",
"sails-mysql": "^1.0.1",
"sails-postgresql": "^2.0.0",
"winston": "^3.3.3",
"grunt": "1.0.4",
"sails-hook-grunt": "^4.0.0"
I want to create records for 2 different models.
These are my models
Inside a controller, i have action that can create a project and create the first project member afterward. The ProjectMember model requires project ID. But i can't get the inserted data after executing the query. It always return undefined
i don't understand why it can't get the inserted record. I already execute the query with exec() and use a callback.
The text was updated successfully, but these errors were encountered: