On 2/18/06, Dae San Hwang <[EMAIL PROTECTED]> wrote:
> Hi,
>
> As I understand, composite primary keys aren't supported in
> ActiveRecord yet.  May I ask if there are plans for this feature?
> Better yet, if this feature is under development, how's the progress
> going?

There is currently no work underway to support composite keys with
active record.  At least in rails itself.  There might well be some
plugins under development.

> I'm not trying to use legacy databases.

Then stick with surrogate ids

> I tend to think that using
> multiple integer column id's (composite primary key) are often
> natural way to implement one-to-many relationships, for things like
> "forum replies".  For example, ID for the third comment of forum
> topic #87 should be (87, 3) not (87, 1074), format being (topic_id,
> reply_id).

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.




--
Cheers

Koz
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to