Forum: Ruby on Rails Legacy DB and composite keys: how do you approach?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
74ba9c207c0b60aa996fbc7db1c28cf9?d=identicon&s=25 Carmine Moleti (carminem)
on 2007-04-21 09:51
Hi to everyone,

First a little background noise.

I'm working on an E-Commerce application in Rails and, at this stage,
I've to
relay on an existing db (MS SQL Server).
The aforementioned db has all the tables with composite primary (and
foreign) keys.

So far I've been using :conditions on has_xxx and belongs_to to overcome
the problem. I mean, until I found "composite_primary_keys" gem.

I've installed the gem and it doesn't work with MS SQL.
The error is "uinitialized constant" at some point.

Putting that aside, I would like to know how do you usually approach the
composite primary key issue.

Thanks in advance for your help.
This topic is locked and can not be replied to.