-
Notifications
You must be signed in to change notification settings - Fork 8
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
Nested attributes don't save and fetch as expected #3
Comments
Or is there another way this is supposed to work? Should I be providing some sort of extra template? The examples are pretty light when it comes to saving/fetching nested models. |
Hello! I've taken a look at your code and see that there are some conventions that need to be followed (some undocumented):
Other things
You can find a working version of your code here. Also, I will update the documentation to make the conventions more clear. Just let me know if you have any more problems. |
@kmalakoff omg thank you so much for going through this! I'm going to go over it and implement the changes :) Hope you had an excellent holiday! |
I could be doing it wrong, but I would expect the following to work:
Errors out with:
Because
om2.get('innerModel')
isnull
. Expected it to be theinnerModel
instance generated whenom
was generated.It looks like since
toJSON
doesn't handle nested models correctly, thecreate
method on line 63 of src/sync.coffee returns no data for the nested attribute.The text was updated successfully, but these errors were encountered: