Article:
  Rolling with Ruby on Rails
Subject:   id or not id
Date:   2006-12-08 20:00:30
From:   ubernoir
"MySQL-Front will automatically create a primary key named Id, but Rails prefers to call it id (all lowercase). I'll explain more later, but for now just change it." errr maybe i missed the explaination but if i wanted to use a more meaningful name than id or anything other than id, can I? so far everything i've tried produces errors
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • id or not id
    2007-02-08 17:41:19  cevisu [View]

    [Rails-core]
    > You shouldn't be thinking about the IDs,
    > they're only there for the sake of persistance,
    > consider them the logical equivalent of
    > an address in memory. It doesn't matter what the > number is, just that there *is* a number.
    -----
    > Are there other reasons against the
    > use of multiple integer column id's other than the > fact that
    > ActiveRecord doesn't support it?

    its only logical that you want to adress the 25th reply (altogether the 1003rd reply) to forum post #64 by the multi-column integer id 64,25 and not 64,1003.
    url-naming is an important part of the user-interface.