Hi.

Is there a way to stop rails from tokenizing a mysql query? I have an
association where I need to change :select to:

 :select   => "*, (select count(something_id) from second_table where
second_table.something_id = main_table.id ) as count"

It works OK without loading associations, however I need to add
an :include. At that point all the select is changed and it says
'count' does not exist.

How can this made to work?

--
M.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to