-
Notifications
You must be signed in to change notification settings - Fork 113
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
Sub models don't update if current value is null #31
Comments
Thanks. I am going to look into this... |
Okay the latest Master branch has a fix. Thanks again for reporting this bug! |
A related issue that I would like your feedback on. If I have the following object If I change answer_id but don't change the id in answer object then the record isn't updated but the response from the rest api says "Record Updated." You can see the detailed requests below, I believe the correct functionality would be to have the response state that the record was not updated. Send: If how ever I send: |
Well as you know, you have a mismatch with your BelongsTo. You don't need to include both values, doing so is confusing the ORM. The record has in fact been updated in that the record has been saved, however your BelongsTo is being overwritten so your not seeing it there... It's a commen problem and one that should be handled. Perhaps you can help me define a better default behavior? On Fri, Jul 26, 2013 at 11:55 PM, brendonbeebe notifications@github.com
|
I have a model "Job" with an id of 1 and a foreign key "type_id"
If the current job.type_id == null and I post the following, nothing happens
{id : 1 , type_id: 1}
If, I however send
{id: 1, type_id: 1, type:{} }
It works perfectly fine. I couldn't figure out what was going on, does anyone have any insight?
The text was updated successfully, but these errors were encountered: