|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Inserting object (self) into oracle table
I am trying to define the following method:
Code:
CREATE OR REPLACE TYPE BODY Customer_objtyp
AS MEMBER PROCEDURE Assign_offer(offer IN Offer_objtyp) IS
BEGIN
INSERT INTO Offer_assignment_tbl
(customer)
VALUES
REF(SELF);
END Assign_offer;
END;
/
Unfortunately, I am shown the oracle error: 4/2 PL/SQL: SQL Statement ignored 5/11 PL/SQL: ORA-03001: unimplemented feature I have also tried the following instead of REF(SELF); "SELF", "DEREF(SELF)", "TREAT(SELF AS Customer_objtyp)" and many combinations in between. How do I create a function that can insert the object the function is called on (SELF) into another table as shown above? The other table is implemented correctly and is expecting a reference to this type. Thanks. p.s) Ignore the unused param passed in 'offer' as I plan to make use of this a little later. |
|
#2
|
|||
|
|||
|
well, I have solved it by selecting the object 'SELF' again, from the Customer_objtab table, checking the 'ID' param to ensure I am getting the same value that 'SELF' represents... but this is completely stupid.
Surely I can just use 'SELF' directly? Oracle continues to baffle me with its shoddy implementations of so-called 'OO'. If there is a sensible way of doing this please let me know. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Inserting object (self) into oracle table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|