-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Triggers after creating an object in cloud code #109
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
They should, since cloud code uses the client methods and calls back in to the server... Did you make sure to change the Parse.serverURL to point to your API server in cloud code? (We do need to document this better.) |
This is the settings I have. Is this what you refer as the Parse.serverURL? var api = new ParseServer({ // Serve the Parse API on the /parse URL prefix For me, the beforeSave/afterSave triggers get called from iOS sdk when an object is modified, but the triggers are not called in my cloud code (main.js) when an object is modified there. |
I think this is the reason: #131 |
Actually, it looks like the objects I try to create in cloud code through object.save() does not get created in MongoDB. This maybe the root cause of why the triggers are not executed. For example: The console.log('Log created for ' + className); shows up in the console, but the record is not created in MongoDB. |
Your Cloud Code is probably trying to save an object against parse.com and either saves it successfully or silently fails depending on whether app with the same appId exists there. |
@r4zzz4k how do I set it to my own localhost than parse.com? |
@r4zzz4k Yes, you are correct, the object get saved in Parse.com! How to modify this behavior? |
Here is how I've managed to overcome this issue on my server: #132 |
Closing this issue as duplicate as the root cause is issue #132 |
…guide Update README.md
Objects created through cloud code no longer triggers beforeSave and afterSave handlers for that object.
The text was updated successfully, but these errors were encountered: