# Has\_many through combinations error

**URL:** <https://www.ruby-forum.com/t/has-many-through-combinations-error/154775>\
**Category:** Rails\
**Created:** [December 3, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/has-many-through-combinations-error/154775 "2008-12-03T19:51:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e95f7d/32.png) [@phil](https://www.ruby-forum.com/u/phil)\
**Post date:** [December 3, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/has-many-through-combinations-error/154775/1 "2008-12-03T19:51:51Z")

</div>

I have these classes:

class FilmTitle \< ActiveRecord::Base  
has\_many :films\_film\_titles  
has\_many :films, :through =\> :films\_film\_titles  
has\_many :assets, :through =\> :films  
end

class Film \< ActiveRecord::Base  
has\_many :assets  
end

class FilmsFilmTitle \< ActiveRecord::Base  
belongs\_to :film  
belongs\_to :film\_title  
end

class Asset \< ActiveRecord::Base  
belongs\_to :film  
end

but this does not work:

ft = FilmTitle.find 13  
ft.assets \<- throws error:  
ActiveRecord::StatementInvalid: Mysql::Error: Unknown column  
‘films.film\_title\_id’ in ‘where clause’: SELECT `assets`.\* FROM  
`assets` INNER JOIN films ON assets.film\_id = films.id WHERE  
((`films`.film\_title\_id = 13))

How can I get to these?

---

<div class="post-metadata">

**Author:** ![phil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e95f7d/32.png) [@phil](https://www.ruby-forum.com/u/phil)\
**Post date:** [December 3, 2008, 10:41pm UTC](https://www.ruby-forum.com/t/has-many-through-combinations-error/154775/2 "2008-12-03T22:41:10Z")

</div>

On Dec 3, 6:50 pm, phil [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have these classes:
> 
> class FilmTitle \< ActiveRecord::Base  
> has\_many :films\_film\_titles  
> has\_many :films, :through =\> :films\_film\_titles  
> has\_many :assets, :through =\> :films  
> end

Last I heard, nested has many throughs like this weren’t supported.

Fred

---

<div class="post-metadata">

**Author:** ![phil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e95f7d/32.png) [@phil](https://www.ruby-forum.com/u/phil)\
**Post date:** [December 3, 2008, 11:41pm UTC](https://www.ruby-forum.com/t/has-many-through-combinations-error/154775/3 "2008-12-03T23:41:36Z")

</div>

Well that’s a drag.  
The SQL is easy… but I was hoping to make a named\_scope.

On Dec 3, 10:40 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
