ember-model icon indicating copy to clipboard operation
ember-model copied to clipboard

hasMany/non-embedded

Open rigelinside opened this issue 12 years ago • 11 comments

Hi , Unable to create hasMany relation in models.

I can get the post_id to enter into the comments if non-embedded, but am having difficulty getting the comment_id added into the post.

Related question on Stackoverflow. so may be I am not doing something wrong. :)

  1. http://stackoverflow.com/questions/18808831/how-to-properly-add-a-related-record
  2. http://stackoverflow.com/questions/18819577/dirty-attribute-during-push-child-id-not-saved-in-parents-record-array

Me : http://stackoverflow.com/questions/18808831/how-to-properly-add-a-related-record/18847240#18847240

rigelinside avatar Sep 17 '13 17:09 rigelinside

@rigeldeshmukh any chance you found solution to this?

ndreckshage avatar Jan 14 '14 17:01 ndreckshage

Hey @ndreckshage, there are definitely outstanding issues w/ relationships that I haven't had a chance to fix. I'd be happy to coordinate with you to get this bugs squashed once and for all. Could you help by reviewing the existing proposed solutions in outstanding PRs (if they exist) and let me know what cases are still unhandled?

ebryn avatar Jan 14 '14 18:01 ebryn

@ndreckshage Does #260 fix your issue?

ebryn avatar Jan 14 '14 18:01 ebryn

@ebryn -- It doesn't unfortunately. Existing parent record still not associated with new children (new child is associated with existing parent though). I'm assuming ideal fix would be for this to happen automatically -- and not need to call load / reload from _data on the parent? I'll look into a fix, still new to this library, so it might take a bit of time to figure out.

ndreckshage avatar Jan 14 '14 19:01 ndreckshage

@ndreckshage can you try out master and see if this is still an issue?

ebryn avatar Mar 12 '14 05:03 ebryn

@ndreckshage ping

ebryn avatar Apr 24 '14 04:04 ebryn

@ebryn I'll check this out this weekend when I have some time -- sry for delayed response.

ndreckshage avatar Apr 24 '14 11:04 ndreckshage

@ebryn havent forgotten about this -- going to check it out today

ndreckshage avatar May 03 '14 17:05 ndreckshage

Still an issue I think @ebryn

Steps I followed: Checkout out master, and built locally w grunt. Used example from my initial issue Still getting User.get('isDirty') >> true

ndreckshage avatar May 03 '14 18:05 ndreckshage

@ndreckshage I'd love to see a failing test PR for this

ebryn avatar May 06 '14 13:05 ebryn

@ebryn #363

ndreckshage avatar May 07 '14 02:05 ndreckshage