Eager loaiding ambiguous columns

The problem i have is when i try to eager load using

@people = Person.find_all_by_id(params[:id],:include=>:salutation)

I get an error "ambiguous column last_name and first_name"

are you also specifying some conditions somewhere? typically this means that instead of writing first_name = 'foo' you need to write salutations.first_name = 'foo' (or the other way round if your conditions should apply to the person's first name).

Fred

Frederick Cheung wrote: