search for: sect_id

Displaying 1 result from an estimated 1 matches for "sect_id".

Did you mean: sec_id
2006 May 18
8
Concatenated key
...a bit stuck with making it work with a concatenated primary key. I want to use my own names for the DB fields and I''m using SQL Server 2005. My tables look roughly like this: CREATE TABLE USERS ( USR_ID VARCHAR(25) NOT NULL PRIMARY KEY, USR_PASS VARCHAR(25) ) CREATE TABLE SECTOR ( SECT_ID TINYINT NOT NULL PRIMARY KEY, SECT_NAME VARCHAR(25) ) CREATE TABLE PERMISSION ( FK_USR_ID VARCHAR(25) NOT NULL, FK_SECT_ID TINYINT NOT NULL ) ALTER TABLE PERMISSION ADD CONSTRAINT PK_PERMISSION PRIMARY KEY (FK_USR_ID,FK_SECT_ID) And my models look like this: class User < ActiveRecord::Base...