Hash and condition

Hello

I would like to use hash in my condition

  1. User.find(:all, :conditions=>{:first_name => ‘akhil’, :role =>
    ‘admin’})

it’s working

User.find(:all,
:include => :profile,
:conditions=>{:band => ‘bolo’, :first_name =>
‘akhil’, :role => ‘admin’})

When i try this will generate this SQL
WHERE (users.“band” = ‘bolo’ AND users.“first_name” = '‘akhil’ AND
users.“role” = ‘admin’)

But i would like the finder generate this SQL
WHERE (profiles.“band” = ‘bolo’ AND users.“first_name” = '‘akhil’ AND
users.“role” = ‘admin’)

How i can do that ?

Bolo

It’s possible to do that ?

a = [“profiles.band” => “bolo”, “users.irst_name” => “bolo”]
User.find(:all,
:include => a,
:conditions=>a)