0

I have a custom Oracle Hibernate Dialect with a custom Oracle spatial type. This type is supposed to replace the standard SDOGeometryType. The purpose of this custom type is to handle complex arcs in Oracle. This worked well on Springboot 2 and Hibernate 5.

Now I am upgrading this to Springboot 3.4.2 with Hibernate (Spatial) 6.6.5.Final I deleted the custom Dialect and created a TypeContributor and registered it in a file named org.hibernate.boot.model.TypeContributor under META-INF/services

I have an ExtendedSDOGeometryType class that implements JdbcType. It has a ExtendedSDOGeometryValueBinder and a ExtendedSDOGeometryValueExtractor. Plus a class ExtendedOracleJDBCTypeFactory that extends OracleJDBCTypeFactory

I see that these classes are loaded and registered/contributed during application startup. But they seem to get overwritten by the default geometry type SDOGeometryType. The OracleDialectContributor and ContributorImplementer are registering the default SDOGeometryType under the same keys as my custom type (Geometry) During runtime, I see that save actions are being handled by the default SDOGeometryValueBinder.

Is there a way that I can disable the default SDOGeometryType? How can I guarantee that my custom type does not get overwritten by the default type? Can I postpone the serviceloading of my TypeContributor in some way?

I tried upgrading to Hibernate 6.6.9.Final but this did not help. Also I tried to add a JdbcType annotation to my entity, so @JdbcType(value=ExtendedSDOGeometryType.class) This also did not help, now the application complains about missing Spring beans for my Typefactory. I also tried to add a custom JavaType implementation, this did not help either.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.