Bonjour,
je travaille avec hibernate tools pour mapper mes tables,
j'ai une table User qui contient un champ creepar et modifieepar,
ces 2 champs doivent référencer un utilisateur :
est-ce normal de faire comme ça ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 Table User : create table USER ( ID INTEGER not null, NOM VARCHAR2(50) not null, MODIFIEPAR INTEGER not null, CREEPAR INTEGER not null, ) alter table add constraint PK_USER primary key (ID); alter table add constraint FK_USER_MODIFIEPAR foreign key (MODIFIEPAR) references USER (ID); alter table add constraint FK_USER_CREEPAR foreign key (CREEPAR) references USER (ID);
Merci
Partager