Desea agregar el alcance a COLUMN_VALUE
pseudo-columna de la tabla anidada:
ALTER TABLE cyclers_tab ADD SCOPE FOR ( COLUMN_VALUE ) IS cycler;
Si entonces haces:
INSERT INTO cycler ( name ) VALUES ( 'c1.1' );
INSERT INTO cycler ( name ) VALUES ( 'c1.2' );
INSERT INTO team (
name,
cyclers
) VALUES (
'team1',
t_cycler_list(
( SELECT REF(c) FROM cycler c WHERE name = 'c1.1' ),
( SELECT REF(c) FROM cycler c WHERE name = 'c1.2' )
)
);
Luego puede insertar la fila. Pero, si tiene otra tabla del mismo tipo de objeto:
CREATE TABLE cycler2 OF t_cycler (
name PRIMARY KEY
);
INSERT INTO cycler2 ( name ) VALUES ( 'c2.1' );
Y trata de hacer:
INSERT INTO team (
name,
cyclers
) VALUES (
'team2',
t_cycler_list(
( SELECT REF(c) FROM cycler2 c WHERE name = 'c2.1' )
)
);
Entonces obtienes el error:
db<>fiddle aquí