Is there a way to ensure the existence of an Oracle object type as part of the generated schema?
I have the following SQL statements to create PROPERTY_ARRAY, a SQL3 object:
create or replace type PROPERTY as object
(
PROPERTY_KEY VARCHAR2(256),
PROPERTY_VALUE VARCHAR2(4000)
);
create or replace type PROPERTY_ARRAY is VARRAY(1000) of PROPERTY;
I also implemented a Hibernate user type that maps to this object. Everything is working fine, except that I have to execute the above script prior to executing the generated hibernate schema. I wonder whether there is a cleaner way to automatically execute the above script before executing the rest of my schema. The ideal solution would be to incorporate the script into hibernate-generated schema directly.
Thanks.
|