From: Alvaro Perez Date: 2007-07-27T18:20:05+09:00 Subject: Re: Array access Hi Todd, thank you very much for your help. First solution doesn't work (same error) but mapping the Target class to sequence_db or hit_sequence tables, which are involved in the join, works perfectly. I have to retrieve data not with targets.first.hit_sequence_ID but with targets.first.attributes['hit_sequence_ID'] Thank you again, Alvaro. Todd Benson wrote: > > class Target < ActiveRecord::Base > set_table_name 'sequence_db' > end > > targets = Target.find_by_sql() > targets.first.hit_sequence_ID > > But, that is hardly the activerecord way. You should really specify > your Base class relations with has_many, belongs_to, etc. > > Todd -- Posted via http://www.ruby-forum.com/.