Raphael Bauduin wrote: > I just tested it and it seems really easy to link Classes to tables. > However, I encountered > a blocking problem: it seems the column that's the primary key has to > be named id. From the code > in the docs > (http://ar.rubyonrails.org/classes/ActiveRecord/Base.html#M000057) it > seems this is hardcoded. > Is it planned to have the name of the "id column" extracted from the > database, or at least to let the user specify a name. I have none of > my columns name id.... :-) I usually prefer to name my primary ID columns <tablename>id just to avoid confusion. For example, the primary key of the user table is called userid. On many-table JOINS it gets confusing to have a lot of IDs floating around. So I agree that being able to change the id column to something else would be handy. Another thing that some people might be confused about is when you have a table whose primary key consists of multiple columns that are combinatorially unique. In these cases I think the solution is to add an integer primary key and use it for the ID column, and then make a unique index across the fields that you wish to be combinatorially unique. Carl