# Forcing has\_many to left join

**URL:** <https://www.ruby-forum.com/t/forcing-has-many-to-left-join/153837>\
**Category:** Rails\
**Created:** [November 21, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/forcing-has-many-to-left-join/153837 "2008-11-21T18:00:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![normelton](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@normelton](https://www.ruby-forum.com/u/normelton)\
**Post date:** [November 21, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/forcing-has-many-to-left-join/153837/1 "2008-11-21T18:00:39Z")

</div>

I’d like for my has\_many :conditions clause to refer to columns on  
both sides of the association. This would require left joining the  
tables, all the time.

See [http://www.pastie.org/320700](http://www.pastie.org/320700)

I’ve already whipped up a little patch that allows me to drop the  
primary key relationship, so I can include whatever conditions I want.  
But it just complains that one of the columns is nonexistent, since I  
can’t figure out how to require a left-join every time.

Is such a thing possible?

Thanks,

Norman
