Rails with composite primary keys and string keys

The guy who is designing our database seems to have specified some keys that are strings as well as some composite keys which are part integer and part string.

I guess I could support that in rails by using find_by_sql() with no problem if I had to ?

I will mention to him that it may be extra work etc.

http://compositekeys.rubyforge.org/

I've referred people to it in the past, but I've never used it myself. I'd love to hear that CPK works without a hitch with all the Rails versions and plugins you care to throw at it, however, I fear that this is not the case.

The changes CPK needs to make all over Rails are rather intrusive and have to be adapted to the evolving code base. I'd expect a lot of code out there, plugins specifically, to tacitly assume that ids are plain numbers or can converted to numbers.

Michael

Michael Schuerig wrote: