Hi, i've this:
has self.user_id, :as => :user_id, :type => :integer
(i've also tried with indexes instead of has, but the result is the
same)
And i want to do this:
Article.search('', :select => "user_id")
i see from the dev.log that the sql query is done correctly:
Querying Sphinx:
Article Load (0.4ms) SELECT user_id FROM `articles` WHERE
(`articles`.`id` IN
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20))
But the result is
[nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil]
When querying directly with find the result is different (and
correct):
>> Article.find_all_by_id([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]).map(&:user_id)
=> [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" 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/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---