#3 ✓resolved
Georg Ledermann

InnerJoin is wrong for "any == true"

Reported by Georg Ledermann | September 24th, 2008 @ 03:12 AM

Using "INNER JOIN" is not the right choice if conditions.any == true.

Example:

search = User.new_search :conditions => { :name_contains => 'Ben',
                                          :orders => { :total_gt => 100 } }
search.conditions.any = true

Using INNER JOIN requires both criteria to be fulfilled. But with "any==true" you have to do a LEFT JOIN.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Provides common named scopes and object based searching.

People watching this ticket

Pages