title: Backbone.js - "Syncing" models between collections
body: <p>I am used to Spine.js, but I want to try out Backbone.js.</p>
  
  <p>In Spine, there are no collections. There are only models. In Spine, when I use a model in different places, Spine always keeps the models synced with each other when I update them. In Backbone, I find this not to be the case. I hope you can tell me what I am doing wrong!</p>
  
  <p>I am trying to create 2 Articles collections which have 3 Article models inside them:</p>
  
  <pre><code>var Article = Backbone.Model.extend({});
  
  var Articles = Backbone.Collection.extend({
    model: Article,
    localStorage: new Backbone.LocalStorage("Articles")
  });
  
  var articles1 = new Articles();
  var articles2 = new Articles();
  
  articles1.create({ id: 1, name: "Article 1" });
  articles1.create({ id: 2, name: "Article 2" });
  articles1.create({ id: 3, name: "Article 3" });
  </code></pre>
  
  <p>In Chrome I use the console and experiment a little:</p>
  
  <pre><code>articles1.size()
  =&gt; 3
  articles2.size()
  =&gt; 0
  articles2.fetch()
  =&gt; undefined
  articles2.size()
  =&gt; 3
  </code></pre>
  
  <p>So far so good. The first Article in both collections is "Article 1":</p>
  
  <pre><code>a1 = articles1.first()
  =&gt; child
  a2 = articles2.first()
  =&gt; child
  a1.get("name")
  =&gt; "Article 1"
  a2.get("name")
  =&gt; "Article 1"
  </code></pre>
  
  <p>But when I try to update the model in the first collection, it is not synced with the second collection:</p>
  
  <pre><code>a1.set({ name: "Article 1 - Updated" })
  =&gt; child
  a1.save()
  =&gt; undefined
  a1.get("name")
  =&gt; "Article 1 - Updated"
  a2.get("name")
  =&gt; "Article 1"
  </code></pre>
  
  <p>I expected the model in the second collection to automatically update itself.</p>
  
  <p>But I can see both article models have different cids:</p>
  
  <pre><code>a1.cid
  =&gt; "c0"
  a2.cid
  =&gt; "c3"
  </code></pre>
  
  <p>So my question is... what do you do in Backbone? How do you keep models synced between collections?</p>
  
  <p>I actually read this blog article: <a href="http://destroytoday.com/blog/reasons-for-spinejs/" rel="nofollow">http://destroytoday.com/blog/reasons-for-spinejs/</a>. He writes:</p>
  
  <blockquote>
    <p>Dynamic Records</p>
    
    <p>This one is just crazy black magic, but it solves a problem I faced
    with Backbone.js. Let’s say you fetched a record in one view of the
    app. Then you fetch and update that same record in a different view.
    In Spine.js, both records will update. You don’t have to worry about
    keeping them in sync. The moment I read about this, a single tear
    rolled down my cheek.</p>
  </blockquote>
  
  <p>I have really tried to search about this but without luck.</p>
  
  <p>I hope you can point me in the right direction on how to do this the Backbone way!</p>