[Rails] Re: Newbie Question

Nithin Reddy
Mon, 27 Feb 2006 19:31:39 -0000

I''m not sure what the current status on composite key support is.
Perhaps someone else would like to chime in?

On 2/27/06, Joe Cairns <joe.cairns@gmail.com>
wrote:
> Nithin Reddy wrote:
> > Well using your model, you can hide a lot of "ugly DB
design" if it is
> > just naming conventions. You can use something like...
> >
> > def customer_id
> >    attribute_read("cust_obj_id")
> > end
> >
> > then just call customer_id from then on in your controllers and views.
> > BTW the table customers should have a primary key simply called
"id"
> > for true Rails semantics.
>
> Thanks!  Would this also handle a table with a composite key?  Say
> consisting of:
> id1 number (5, 0)
> id2 char (4)
> id3 timestamp
>
> If not is there a workaround?
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>