-Im having a problem in apex with object tables with references to other object type tables so here is the code i have:
-Im creating a simple type :
CREATE TYPE person_typ AS OBJECT (
idno NUMBER,
first_name VARCHAR2(20),
last_name VARCHAR2(25),
email VARCHAR2(25),
phone VARCHAR2(20),
);
-and then a object table:
CREATE TABLE person_obj_table OF person_typ;
-inserting a value:
INSERT INTO person_obj_table VALUES (
person_typ(101, 'John', 'Smith', 'jsmith@example.com', '1-650-555-0135') );
everything works fine for now !
OK so here is where the problem starts
If I try to create another table with a reference to the object person_typ like this:
CREATE TABLE contacts_ref (
contact_ref REF person_typ SCOPE IS person_obj_table,
contact_date DATE
);
the table is created successfully but then when I go to the object browser and when I check the table data I get this error message :
report error: ORA-00932: inconsistent datatypes: expected CHAR got REF ILIJAKOCEV1330542.PERSON_TYP

And now when I try to insert some data in the table I get a successfull message that a row has been inserted but the data is not visible and I can't access it
and I get the same error report when I check the data in the table
INSERT INTO contacts_ref
SELECT REF(p), '01 03 2003'
FROM person_obj_table p
WHERE p.idno = 101;
So can anyone help me with this problem ?
btw all of the above examples are from the official oracle documentation http://docs.oracle.com/cd/B28359_01/appdev.111/b28371/adobjint.htm#i458258