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

Meta Relationships Issue #1308

Closed
2 of 3 tasks
wycats opened this issue Sep 16, 2013 · 19 comments
Closed
2 of 3 tasks

Meta Relationships Issue #1308

wycats opened this issue Sep 16, 2013 · 19 comments

Comments

@wycats
Copy link
Member

wycats commented Sep 16, 2013

A number of issues with relationships will be resolved with an upcoming refactor of relationships.

I'm tracking them here so I remember to keep them in mind and avoid exploding the ticket count with issues that will all be resolved at once.

@alexspeller
Copy link
Contributor

I was also experiencing this issue - it seems that it occurs with both async and non-async relationships.

@matthooks
Copy link
Contributor

+1 for the bidirectional relationship sync issue on non-async hasMany relationships.

@alexspeller
Copy link
Contributor

@wycats what's the timeline on this refactor? Having the relationships live update is pretty important to my use case and I'd be willing to try and fix this without relying on a massive refactor unless the timeline is very soon - would you be willing to merge a temp fix for this issue pending the big refactor?

@wycats
Copy link
Member Author

wycats commented Sep 16, 2013

I would give the refactor a week (or two, tops). I'd be happy to merge a short-term fix that wasn't too invasive.

@decasia
Copy link

decasia commented Sep 18, 2013

+1 to this issue in general. I think it also would really help to have more docs on how async relationships are supposed to work; I'm seeing foreign keys inexplicably getting set to null on save, which may well be an error on my part somewhere, but without clear docs about what I should be doing, it's hard for me to sort out. Not sure if that has anything to do with this commit.

@wycats
Copy link
Member Author

wycats commented Sep 19, 2013

Failing test in #1327.

@epotvin
Copy link

epotvin commented Sep 23, 2013

About the issue #1302, the problem is not resolved. Check this example :

http://jsfiddle.net/NQKvy/235/

Clicking the button execute the test action of IndexController. The action creates a new mail with the discussion set to the current discussion. So the relation "discussion" of the object "mail" has the good value. But in the "mails" attribute of the "Discussion" object, the new mail is not there, meaning that the bidirectional relation is broken.

The mail not being in the mails relation of the discussion avoid it to be displayed under the already saved mail with text Hello.

Emmanuel

@tim-evans
Copy link
Contributor

This issue is leaving our app in a bit of a borked state. I've been very satisfied with the upgrade to 1.0 otherwise. Really solid work.

@bradleypriest
Copy link
Member

Another to possibly add to the list, although it is a little specific to embedded objects.

The _data attribute isn't reset after commit for objects apart from the primary object because it is triggered by adapterDidCommit. Inversely, inFlightAttributes aren't set on save.

@JaredSartin
Copy link

status?

@alexspeller
Copy link
Contributor

@JaredSartin nothing has changed otherwise the issue would be updated

@JaredSartin
Copy link

Sorry, @alexspeller. I am trying to keep vital issues on the periphery and was hoping that progress was made without an update. @wycats said a week or 2 tops... In any manner, is there a decent workaround?

@lukegalea
Copy link

Any updates on this? Not having relationships set isDirty is a huge problem for us as we want to alert the user that there are unsaved changes.

@decasia
Copy link

decasia commented Jan 29, 2014

@lukegalea, for what it's worth, it's possible to implement that functionality yourself fairly easily -- here's a gist of some code that works for me. Hopefully I can get rid of this code later when Ember implements the feature, but for now the workaround has been adequate.

@lukegalea
Copy link

Thanks. I have something similar working now, but I sure would love some
native support in Ember-Data :)

On Wed, Jan 29, 2014 at 2:37 PM, eli thorkelson notifications@github.comwrote:

@lukegalea https://github.com/lukegalea, for what it's worth, it's
possible to implement that functionality yourself fairly easily -- here's a
gist of some code that works for mehttps://gist.github.com/decasia/8695244.
Hopefully I can get rid of this code later when Ember implements the
feature, but for now the workaround has been adequate.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1308#issuecomment-33621408
.

Luke Galea
CTO | PrecisionNutrition

@kumavis
Copy link

kumavis commented Oct 15, 2014

+1 #1367 Dirtying when belongsTo changes

@kumavis
Copy link

kumavis commented Oct 15, 2014

Additionally, the ability to rollback those relations

@timrwood
Copy link

I've opened an RFC for this issue. Please weigh in.

emberjs/rfcs#21

@sly7-7
Copy link
Contributor

sly7-7 commented Dec 10, 2014

I'm closing, superceeded by #2545

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests