From: David Heinemeier Hansson Date: 2005-04-03T06:01:04+09:00 Subject: Re: Active Record and different field names > As i understand AR and Rails assumes "id" as a field name for primary > keys. What > if I have totally different names for fields? How to join to such > tables > using AR? I couldn't find the answer in API for AR. You can specify a different primary key than id using set_primary_key, like: class Person < ActiveRecord::Base set_primary_key "iPeopleId" end Similar construct for a unguessable table name with set_table_name. -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://www.loudthinking.com/ -- Broadcasting Brain