ember-changeset
ember-changeset copied to clipboard
Validation of associated models (Question)
Hi,
I am using "ember-changeset" along with "ember-changeset-validation" for client side validation. Going through the docs, I couldn't find any information regarding how changeset works with ember model association (belongsTo, hasMany).
Currently, I require validation of objects having hasMany relation to my model, Am I supposed to create changeset for every objects in the hasMany association ? This could be a tedious process when the objects are being added/removed dynamically.
Would really like to know the opinion of "ember-changset" regarding this case.
Thanks
At the moment there isn't much support for hasMany
s, but belongsTo
relationships should work fine.
I'm unsure if a parent changeset should automatically create a changeset for each hasMany
association. Could you share how you currently solve this?
+1
@sudhirt4 I'll probably face this issue in the near future. Could you share with us how you currently solve this?
Any updates on this? I am facing a similar issue!!
Any updates on this subject? It would be nice to create chance set for each hasMany relationships.
@GCorbel Currently going through a rewrite to solve issues. Will circle back when that is done.
Nice. Just to know, because I need it for my current project, do you think it will take a long time?
@GCorbel Using version 1.3.0
should be perfectly fine for most cases. After this version, a concept called Relay
was added for nested key setter support. However, that has caused pain in a variety of uses cases. So 2.0.0
will try to get back to1.3.0
+ lots of improvements.
Hopefully by mid-November but no promises :trollface:
Thanks, I will try with 1.3.0. Let me know if I can help.