• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Composite key as foreign key


There is not yet a method to assign compound foreign keys to reference with another table

Currently there is only one forge method to assign primary keys as compounds. addKey() 

I think there should be a method that works similarly but for foreign keys, to have a result like this:

create table Music (
    type char(1) not null check (type = 'M'),
    id integer not null,
    primary key (type, id),
    foreign key (type, id) references Product

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.