title: Bookshelf.js: how to define cross-relations?
body: <p>How can i define hasMany Space -> Accounts relation?</p>
  
  <pre><code>var Space = Bookshelf.Model.extend({
      tableName : 'spaces',
      // Account variable does not exist :/
  });
  
  var Account = Bookshelf.Model.extend({
      tableName : 'accounts',
      spaceId   : function() {
          return this.belongsTo(Space);
      },
  });
  </code></pre>
  
  <p>What is the correct way to define this?</p>
  
  <p>P.S. There is no tag for bookshelf js library: <a href="http://bookshelfjs.org/" rel="nofollow">http://bookshelfjs.org/</a></p>