I am attempting to insert information into tables that i have created- some of these tables have references to other tables as an attribute.

I am able to insert just fine into one of my tables that has a reference, but i am having problems with the others, and i am at a loss to explain why because the statement indicating where the reference should point is the same structure.

String_TY('Is the president of union'),
(SELECT ref (s) FROM student_OT s WHERE s.student_id = '116'));

student_id is of type VARCHAR2, and i find that if before this statement i insert a student with id '116' (an insert with a ref to another table which works absolutely fine)- and then i attempt to run this insert i get an error message like this

ERROR at line 1:
ORA-22979: cannot INSERT object view REF or user-defined REF

yet if i run that same insert given in my eg with a student number that i haven't already created, then it creates the row- but this shouldn't be the case- there is clearly a problem with the ref. I looked at my type/table create statements for any explanations and i cannot figure out why it won't work, it all seems fine.

Does anyone know what the my problem is???!! Please!