Skip to content
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

Cannot set relationship in 3.2.0 #5517

Closed
amk221 opened this issue Jul 5, 2018 · 12 comments
Closed

Cannot set relationship in 3.2.0 #5517

amk221 opened this issue Jul 5, 2018 · 12 comments
Assignees
Labels
🏷️ bug This PR primarily fixes a reported issue

Comments

@amk221
Copy link
Contributor

amk221 commented Jul 5, 2018

Clearing out the relationship then setting it no longer works.

e.g:

myModel.setProperties({
  name: null,
  myRel: null
});

myModel.set('myRel', myRel);

Passing in 2.18.2: Twiddle
Switch to 3.2.0 for a failure

@amk221
Copy link
Contributor Author

amk221 commented Jul 5, 2018

Maybe also related to: #5511

selvaa89 added a commit to selvaa89/data that referenced this issue Jul 19, 2018
runspired added a commit that referenced this issue Jul 19, 2018
@runspired runspired self-assigned this Jul 21, 2018
@runspired runspired added the Bug label Jul 21, 2018
runspired added a commit that referenced this issue Jul 23, 2018
)

* adds failing tests for #5511 and #5517

* add a test for #5525 that suspiciously passes

* adds test for #5522 isEmpty issue

* run prettier

* fix issue with proxy

* upgrade test for potential issue with create, still passes

* fix emberobserver issue for missing data member in payloads
@acorncom
Copy link
Contributor

acorncom commented Aug 3, 2018

This bug might be fixed now?

@runspired
Copy link
Contributor

It is fixed.

@jrjohnson
Copy link
Contributor

@runspired is there a good release to test this in?

@runspired
Copy link
Contributor

@jrjohnson fix was released in all stable versions

@jrjohnson
Copy link
Contributor

Oh OK, I still have a possibly related issue in 3.3.1. I will try and create a useful reproduction and a new ticket.

@amk221
Copy link
Contributor Author

amk221 commented Aug 13, 2018

Same here, I tried emberjs/data#master, but still having problems. Currently stuck on 2.18.0

@runspired
Copy link
Contributor

@amk221 I have mega doubts that this issue still exists on master without a reproducible failing scenario. I did look at the repro you mentioned here: amk221/-ember-data-geturl-not-a-function@3ab9aa7 and as others mentioned the test itself is incorrect and passes when fixed.

I noticed your comments:

The actual test does some setting and unsetting of relationships. But still comes back with this error.
i.e. Setting the relationship from null back to an ED model does not work due to the above bug in 5517, therefore, the test ends up deepEqualing an ED model with null, which triggers the error in question.

However we have tests that cover exactly this scenario, so without a clear test setup showing this problem still exists for some set of conditions I'm inclined to believe it's more likely an issue with app code.

@amk221
Copy link
Contributor Author

amk221 commented Aug 13, 2018

ok, thank you for your input. I'll try to amalgamate the two and come up with a better failing case.

NullVoxPopuli pushed a commit to NullVoxPopuli/data that referenced this issue Sep 8, 2018
…berjs#5533)

* adds failing tests for emberjs#5511 and emberjs#5517

* add a test for emberjs#5525 that suspiciously passes

* adds test for emberjs#5522 isEmpty issue

* run prettier

* fix issue with proxy

* upgrade test for potential issue with create, still passes

* fix emberobserver issue for missing data member in payloads
NullVoxPopuli pushed a commit to NullVoxPopuli/data that referenced this issue Sep 8, 2018
@amk221
Copy link
Contributor Author

amk221 commented Oct 23, 2018

I still get (0 , _emberMetal.get)(...).getURL is not a function with ED 3.5.0 in this minimal test case

@dmarkin
Copy link

dmarkin commented Dec 27, 2018

The bug is here.
I have the Model Offer, including
type: belongsTo('offerType', {async: true})
and Model Offer-type with some properties.
With updating from 2.12 to 3.5 Ember breaks down the app cause if I do
offer.set('type', someNewTypeFromStore)
I'll get finally
offer.get('type') === null

@Skwai
Copy link

Skwai commented Jan 14, 2019

We're seeing the same issue as @dmarkin in 3.3.0. Any work arounds?

@runspired runspired added the 🏷️ bug This PR primarily fixes a reported issue label Sep 11, 2023
@runspired runspired removed the Bug label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bug This PR primarily fixes a reported issue
Projects
None yet
Development

No branches or pull requests

6 participants