ActiveRecord Limitation (Advance)

Or is it ?

Need to be able to :-

@search = Form.find(:all, :include=>[:form_type, :form_type_items], :conditions=>....)

I need in the Form model a :form_type_items, the question is, what is the relationship type?

Current Models:- Form belongs_to :form_type

FormType has_many :form_types has_many :form_type_items

FormTypeItem Belongs_to :form_type

Form

Form belongs_to :form_type has_many :form_type_items, :through => :form_type

Unfortunately, that code fails with:-

Mysql::Error: #42S22Unknown column 'form_types.form_type_id' in 'on clause'

as this is not a:-

pk<-(fk/fk)->pk relationship.

its a fk->(pk)<-fk, any ideas what the relationship type is in that case?

Thanks

Worked Perfectly!

You guys are guru's.....

Ps.. Didn't know that hash inside include feature, rails amazes me more everyday!

Thanks!