I had read this one,
http://rubyforge.org/forum/forum.php?thread_id=18082&forum_id=14244;
steroids seems to work well…
I found some clues here :
/usr/lib/ruby/gems/1.8/gems/has_many_polymorphs-2.12/test/integration/app/config/ultrasphinx/development.conf.canonical
wich show the output :
SELECT (states.id * 4 + 0) AS id, CAST(GROUP_CONCAT(addresses.name
SEPARATOR ' ') AS CHAR) AS address_name, 0 AS capitalization,
'Geo::State' AS class, 0 AS class_id, '' AS company, '' AS company_name,
0 AS company_name_facet, '' AS content, UNIX_TIMESTAMP('1970-01-01
00:00:00') AS created_at, 0 AS deleted, '' AS email,
'__empty_searchable__' AS empty_searchable, '' AS login, '' AS name, ''
AS state, 0 AS user_id FROM states LEFT OUTER JOIN addresses ON
states.id = addresses.state_id WHERE states.id >= $start AND states.id
<= $end GROUP BY id;
seems to show that it would work, I just like to get the source from the
concerned model… might take time on this one.
The problem is, when you see hmp working in the console, you get this
kind of sql syntax (the one above); wich is basically unwriteable if you
have more than three models working with it, this syntax is totally
different from the one you would just write in a regular sql syntax to
call records as they are stored :
SELECT model1.* FROM model1 INNER JOIN model1.id =
assoc_model.assoc_field_id WHERE blah…
--
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 [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
-~----------~----~----~----~------~----~------~--~---