I''m sure this is not a new topic -- I''ve read mention of it elsewhere -- but in addition to :joins => :profile, Active Record also needs :inner_joins => :profile, :outer_joins => :profile, :left_joins => :profile, and all the popular combinations of join types. I''ve got a sqlite development environment with mysql in production. mysql says "what?" when it see LEFT OUTER JOIN. I''m going to try playing with database specific code through the ActiveRecord::Base.instanceof? method, but that certainly isn''t a particularly elegant approach. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jun 9, 12:38 pm, JohnnyC <gbull...-7Vr58nveOG2aMJb+Lgu22Q@public.gmane.org> wrote:> I''m sure this is not a new topic -- I''ve read mention of it elsewhere > -- but in addition to :joins => :profile, Active Record also > needs :inner_joins => :profile, :outer_joins => :profile, :left_joins > => :profile, and all the popular combinations of join types.Why not just use :include? Then it will be portable and do the right type of join (or maybe no join at all if not needed) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
JohnnyC wrote:> I''m sure this is not a new topic -- I''ve read mention of it elsewhere > -- but in addition to :joins => :profile, Active Record also > needs :inner_joins => :profile, :outer_joins => :profile, :left_joins > => :profile, and all the popular combinations of join types. > > I''ve got a sqlite development environment with mysql in production. > mysql says "what?" when it see LEFT OUTER JOIN.That''s probably not the actual issue. According to http://dev.mysql.com/doc/refman/5.0/en/join.html , LEFT OUTER JOIN is legal in MySQL. What errors are you actually getting? Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.