-
Notifications
You must be signed in to change notification settings - Fork 362
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
upsert does not set ctx.instance #487
Comments
Please create a test project on Github to reproduce the issue as per https://github.com/strongloop/loopback/wiki/Issues#bug-report |
@jmls which "PUT" are you referring to? I assume you mean If your datasource supports However, if your dataSource does not cater for this optimized scenario, it will perform a find and then performs Finally, if a new instance was created during this step, it will only be available in the 'unoptimized' scenario, just like |
@jmls the current implementation of
Let me correct this, you will have See the discussion in #482 for more information. |
using a "PUT" (Update an existing model instance or insert a new one into the data source) where there isn't an existing record, ctx.data is set, not ctx.instance, even if it is a new record
this makes it impossible to perform certain tasks on the creation of a new record using PUT
The text was updated successfully, but these errors were encountered: