# Save only working on New objects

**URL:** <https://www.ruby-forum.com/t/save-only-working-on-new-objects/168115>\
**Category:** Rails\
**Created:** [May 16, 2009, 6:34am UTC](https://www.ruby-forum.com/t/save-only-working-on-new-objects/168115 "2009-05-16T06:34:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9fc348/32.png) [@bobm](https://www.ruby-forum.com/u/bobm)\
**Post date:** [May 16, 2009, 6:34am UTC](https://www.ruby-forum.com/t/save-only-working-on-new-objects/168115/1 "2009-05-16T06:34:59Z")

</div>

I’m using a habtm self referential (below). When I work with it in the  
console, if I do this:

memberA.friends[0] = memberB  
memberA.save

Nothing actually gets saved to the join table. (memberA and memberB are  
previously saved objects).

If, however, I do this:

memberA.friends[0] = Member.new // the new object here is the  
difference  
memberA.save

the relationship Does get saved to the join table.

Anyone have a clue as to why this is? And how I can get changes to  
previously saved objects to save to the sql join table?

Thanks!
