java - Postgis and Oracle spatial queries with GeometryUserType parameters -
following configuration of postgis , oracle spatial different hibernate persistence units , have instances of myclass persisted either postgis or oracle database configured in persistence.xml , mapping file. i have geom attribute annotated : public abstract class myclass (...) @type(type = "org.hibernatespatial.geometryusertype") @column(name = "geom", columndefinition="geometry", nullable = true) protected geometry geom; (...) persistence.xml configured : <persistence-unit name="pers_unit_name" transaction-type="jta"> <provider>org.hibernate.ejb.hibernatepersistence</provider> <jta-data-source>jta_data_source_name</jta-data-source> <mapping-file>oracle.hbm.xml</mapping-file> and in oracle.hbm.xml : <hibernate-mapping> <typedef name="org.hibernatespatial.geometryusertype" class="org.hibernatespatial.geometryusertype" > ...