Paolo Negri
2007-Jan-17 15:13 UTC
ActiveRecord find with :include and :select ignores :select
Hi I''m using rails 1.1.6 with postgresql 8.1 with c driver on linux I noticed that when on my ActiveRecord objects I use the :select option and the :include option together the :select seems to be ignored and all the fields from all the tables are extracted. Basicly any query is like SELECT * FROM ... exactly like if the :select option wasn''t there. The :select option works fine (only the specified fields are extracted from the database) when I don''t use the :include option. I''d like to know if someone else had the same issue. Thanks Paolo --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Paolo Negri
2007-Jan-17 16:22 UTC
Re: ActiveRecord find with :include and :select ignores :select
I''ve found a trac ticket open for this http://dev.rubyonrails.org/ticket/5371 So I suppose there''s no fix at the moment. Paolo On Jan 17, 3:13 pm, "Paolo Negri" <hungryl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > > I''m using rails 1.1.6 with postgresql 8.1 with c driver on linux I > noticed that when on my ActiveRecord objects I use the :select option > and the :include option together the :select seems to be ignored and > all the fields from all the tables are extracted. > Basicly any query is like SELECT * FROM ... exactly like if the > :select option wasn''t there. > > The :select option works fine (only the specified fields are extracted > from the database) when I don''t use the :include option. > > I''d like to know if someone else had the same issue. > > Thanks > > Paolo--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---