On 9 January 2013 15:08, Alexandra E Paredes T <[email protected]> wrote:
> Hi!
>
> I've a couple of questions about the primary key on RoR:
>
> Is there a way to use non-numeric autoincrement primary key?
> Is there a way to use compound primary key?

Yes, but really don't do it unless you are working with a legacy db
that you cannot change (absolutely definitely impossible to change).
Otherwise use the default id for the primary key and add compound
indexes for the compounded fields if necessary.  That will be /much/
less effort.

Colin

>
> If not possible, we want to work on a ruby gem to read a database and made
> the model from it. So, there are recommendations regard the two things
> above?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/W6tGrJQNhP4J.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to