in reply to Catalyst and DBIC, lookup table question

You did not say what database you were using, but it strikes me as strange that the following attributes are missing from your ID fields:

            "XML is like violence: if it doesn't solve your problem, use more."

  • Comment on Re: Catalyst and DBIC, lookup table question

Replies are listed 'Best First'.
Re^2: Catalyst and DBIC, lookup table question
by vendion (Scribe) on Sep 11, 2011 at 13:37 UTC

    I did state in my OP that I was using "Postgre", and the PRIMARY KEY assignment is done further down in the SQL dump, in typical Postgresql fashion.

    ALTER TABLE computer ALTER COLUMN compid SET DEFAULT nextval('computer +_compid_seq'::regclass); ALTER TABLE customers ALTER COLUMN uniqid SET DEFAULT nextval('custome +rs_uniqid_seq'::regclass); ALTER TABLE ONLY computer ADD CONSTRAINT computer_pkey PRIMARY KEY (compid); ALTER TABLE ONLY customers ADD CONSTRAINT customers_pkey PRIMARY KEY (uniqid); ALTER TABLE ONLY customerstocomputers ADD CONSTRAINT customerstocomputers_pkey PRIMARY KEY (custid, comp +id); ALTER TABLE ONLY customerstocomputers ADD CONSTRAINT customerstocomputers_custid_fkey FOREIGN KEY (custi +d) REFERENCES customers(uniqid); ALTER TABLE ONLY customerstocomputers ADD CONSTRAINT customerstocomputers_compid_fkey FOREIGN KEY (compi +d) REFERENCES computer(compid);