Hi,
I have a pl/sql stored procedure in oracle 10 that I am calling from a named query using an EntityManger (the version in jboss 4.2 ga).
One of the parameters the stored procedure takes is a VARRAY.
I have a (crude) UserType that handles the Oracle ARRAY object I build to use as the VARRAY parameter.
If I create the query using the entity manager and then do:
Code:
org.hibernate.Query underlyingHbmQuery = ((QueryImpl)namedQry).getHibernateQuery();
underlyingHbmQuery.setParameter("paramName", oraArray, vArrayType);
Then everything works fine :)
If, however I just try to set the varray parameter using query.setParameter("name", object) then I get a strange oracle "not serializable" exception...
The VARRAY is not a property on any of my entities.
I can't find any way of registering a UserType with the EntityManger (or related EntityManagerFactory) - as I would using a <typedef> element in a hibernate mapping file.
Does anyone have any suggestions?
Thanks,
Andy