Gestion des Tables d'Object
Bonjour,
j'ai un petit soucis sur la gestion/compréhension des tables d'Objet
dans le contexte suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
Create or Replace Type Repertoire AS OBJECT (
ID NUMBER,
Propriétaire Ref Disque,
Nom Varchar2(255),
Pére Ref Repertoire
);
Create Table Repertoires of Repertoire(
Pére With ROWID SCOPE IS Repertoires,
Propriétaire With ROWID SCOPE IS Disques,
CONSTRAINT PK_Repertoires primary key(ID)
);
Alter Table Repertoires
ADD CONSTRAINT FK_Repertoires_PERE FOREIGN KEY (Pére)
REFERENCES Repertoires ON DELETE CASCADE;
create index I_Pere_Repertoires
on REPERTOIRES(pére); |
Alors que la table est une table d'objet ( Row object), j'ai l'erreur suivante :
Code:
1 2 3 4 5
|
ORA-02332 cannot create index on attributes of this column
Cause: An attempt was made to create an index on an attributes of an object
type column.
Action: Do not specify the index on the attribute. |
Si j'inverse l'ordre de création, ie l'index avant la contrainte je n'ai pas de msg d'erreur.
La premiére démarche me semble théoriquement valide ?
Quelqu'un a-t-il une explication ?
Merci