title: Node.js/Bookshelf - Mapping model where multiple columns in a table reference the ID of another table
body: <p>I am using node.js with bookshelf as an ORM. I am a serious novice with this technology.</p>
  
  <p>I have a situation where I have several columns in a database table. For the sake of this question, these columns shall be named 'sold_by_id', 'signed_off_by_id' and 'lead_developer_id', and are all columns that will reference a User table with an ID.</p>
  
  <p>In other words, different User's in the system would at any point be associated with three different roles, not necessarily uniquely.</p>
  
  <p>Going forward, I would need to be able to retrieve information in such ways as:</p>
  
  <pre><code>let soldByLastName = JobTicket.soldBy.get('last_name');
  </code></pre>
  
  <p>I've tried searching around and reading the documentation but I'm still very uncertain about how to achieve this. Obviously the below doesn't work and I'm aware that the second parameter is meant for the target table, but it illustrates the concept of what I'm trying to achieve.</p>
  
  <pre><code>// JobTicket.js
  soldBy: function() {
      return this.belongsTo(User, 'sold_by_id');
  },
  
  signedOffBy: function() {
      return this.belongsTo(User, 'signed_off_by_id');
  },
  
  leadDeveloper: function() {
      return this.belongsTo(User, 'lead_developer_id');
  }
  </code></pre>
  
  <p>Obviously I would need a corresponding set of methods in <code>User.js</code></p>
  
  <p>I'm not sure where to start, can anyone point me in the right direction??</p>
  
  <p>Or am I just a total idiot? ^_^</p>