Here's a patch that fixes that for me: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3208
Need upvoting, I guess. On Jan 16, 6:21 pm, Pat Allan <[email protected]> wrote: > I've investigated this further, and it seems that it's actually a bug in > ActiveRecord. Thinking Sphinx uses ActiveRecord's query generation classes, > and AR ignores the :primary_key option when joining on a belongs_to > association... > > To reproduce this in normal AR (I'm assuming you have the normal timestamp > columns), fire up script/console: > > Listing.find(:all, :conditions => {:categories => {:created_at => > 10.years.ago..Time.now}}) > > Look at the query in your development.log file, and it should have the same > flaw. > > I'm happy to confirm this is a bug in a ticket for Rails, and maybe even > submit a patch - could you just confirm my findings? -- 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.
