:select option

5 views
Skip to first unread message

badnaam

unread,
Jul 27, 2010, 3:17:30 PM7/27/10
to Searchlogic
Is select option possible in the following case?

This is for the model VoteTopic (has_many vote_items, votes AND
belongs to category and user)

scope_procedure :all_approved, lambda
{status_equals(STATUS['approved']).descend_by_created_at(:include =>
[{:vote_items => :votes}, :user, :category],
:select => 'vote_topics.header vote_topics.id
vote_topics.topic ')}

I notice that the select clause is ignored in the quries.

[4;35;1mUser Columns (1.4ms) [0m [0mSHOW FIELDS FROM `users` [0m
[4;36;1mVoteTopic Columns (1.0ms) [0m [0;1mSHOW FIELDS FROM
`vote_topics` [0m
[4;35;1mVoteTopic Load (0.2ms) [0m [0mSELECT * FROM
`vote_topics` WHERE (vote_topics.status = 'a') ORDER BY
vote_topics.created_at DESC LIMIT 0, 10 [0m
[4;36;1mSQL (0.1ms) [0m [0;1mSELECT count(*) AS count_all FROM
`vote_topics` WHERE (vote_topics.status = 'a') [0m
Rendering template within layouts/main

badnaam

unread,
Aug 3, 2010, 10:18:56 PM8/3/10
to Searchlogic
Anyone? Is it possible to select only certain fields when using
Searchlogic?

Thanks

badnaam

unread,
Aug 5, 2010, 6:59:33 PM8/5/10
to Searchlogic
Bump! Help please.
Reply all
Reply to author
Forward
0 new messages