-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
hasMany relationship broken with [email protected] #281
Comments
It's not related to |
Any workarounds for this? |
@mukk85 workaround is to use a non-beta release for now, sadly. I would also appreciate any pull requests addressing this bug! |
I tried to downgrade to ember-changeset-validations 1.2.9 and it was still occuring. Which version would you recommend? |
@mukk85 The latest version of e-c-v has a more lax version req. |
Oh sorry, I must have rolled that change back because of an installation issue. Will have to investigate that later. |
If using yarn, you could enfore a specific version even for sub-dependencies using |
Thanks @jelhan. That is a good temporary solution! |
👍 on the temp solution via package.json's |
This is fixed in ember-changeset. Verified by adding, saving, and removing a has many relationship. Will look to releasing 1.5 proper soon! Lmk if anybody has another issue! Will close for now if you don't mind! |
I still have the same issue after upgrading to changeset ^1.5.0 and changeset validation ^1.3.0 |
@m-nagy Would you mind posting a reproduction or example code so we can help? I've tested both belongsTo and hasMany relationships in my own apps. |
Also added a m2m test to verify it works. So we might be missing a different scenario. |
@snewcomer: I have the same problem. Have you tested it with a template? The tests are all with out one if I am correct. Maybe it has something to do with the glimmer getter. |
Sadly I haven't used it this way in my apps but I am sure you are right wrt to the getter. Alright, well time to re-evaluate this Relay thing. Requiring .get is not feasible for the new modern Ember. I'm sorry everyone. Perhaps was a good idea while it lasted. Will try to evaluate removing Relay/using plain Proxy (w/ polyfill) for now... |
There will be downsides to not using a Relay, but we will see where we can get to support nested objects. |
Just upgraded to latest and my acceptance tests are breaking with this error:
|
I have the same issue with this mocha test :
In this case, a form has many fields. I checked a bit and it happens because, I think the the code should check if it's an array before to show the error. |
Also, it seems than |
I'm also getting this, have downgraded back to EC 1.3.0 to resolve |
I'm seeing something along these lines with the latest EC (1.6.0). I have an embedded records mixin record with embedded: 'always' on a hasMany relationship and when I try to access that relationship, I am getting a Proxy instead of the actual content. |
@abobwhite Do you have an example that you could share (even psuedo code)? Working on 2.0-beta branch (try if out if you would like - it might fix your issue) and would like to add a test to ensure this isn't present when we release 2.0! |
@snewcomer Thanks! The issue is not that of the original thread but it is similar to when @GCorbel mentioned on 10/20/18. I have a changeset build on a model
My snippet of code is trying to iterate over the selected tags via the changeset (I'm using
It's an issue grabbing the length property when iterating the
I see the same error when using the 2.0-beta branch. |
After more searching and debugging, it appears it was actually an error during render of the |
@snewcomer Sorry for the back-and-forth. After even more debugging, I'm no longer sure that it's not EC. I can use the The above code is not where the error happens but rather during render so it's really hard to figure out where it's happening. Any thoughts? |
@abobwhite Is it specifically |
@snewcomer yes. It doesn't appear to be the body of the function causing the issue but fwiw, |
Just to notify everyone, |
@snewcomer There were two forms in my Ember 3.4 app that had this issue when upgrading from Thanks for all the hard work getting this released! |
I finally got around to upgrading to 2.0.0, @snewcomer and it appears to be working correctly for me now 🎆 🥂 |
Thank you everyone. Feel free to reopen if you have any issues! |
Upgraded
ember-changeset
andember-changeset-validations
to the latests versions (1.4.2-beta.0 and 1.2.10) and now every time i access a hasMany relationship i get this weird error:and also this:
Line
39848
in my vendor.js is https://github.com/emberjs/ember.js/blob/bdc2c3e3a15d13d8bb1951d44b1a28ee1c6a36cb/packages/ember-metal/lib/property_get.js#L67After downgraded
ember-changeset-validations
to 1.2.8 again everything works. I only get this error when my model that has a hasMany relationship is new and unsaved.The text was updated successfully, but these errors were encountered: