title: Rails - has_many with different column names?
body: <p>I have a data model - <code>SeasonTeams</code> with the following relation: </p>
  
  <p><code>has_many :linked_team_constraints, class_name: 'LinkedTeamConstraints', dependent: :destroy</code></p>
  
  <p>Then I have the <code>LinkedTeamConstraints</code> model as follows: </p>
  
  <p><code>belongs_to :season_team, primary_key: :_id</code></p>
  
  <p>Now when I call <code>destroy</code> on the <code>SeasonTeam</code> - thereby destroying the <code>LinkedTeamConstraint</code> - I get error <code>column linked_team_constraints.season_team_id does not exist</code>. I <em>do</em> have two OTHER columns labeled <code>season_team_id_1</code> and <code>season_team_id_2</code>. How can I establish a has_many relationship such that <code>linked_team_constraints.season_team_id_1</code> or <code>..._id_2</code> is queried instead of <code>...season_team_id</code>. </p>
  
  <p>Would it be something like: </p>
  
  <p><code>has_many :linked_team_constraints... {where("_id == ?", linked_team_constraints.season_team_id_1 || linked_team_constraints.season_team_id_2)}</code>?</p>