title: failing to persist geometry object to oracle using hibernate spatial
body: <p>I'm using <strong>Spring</strong> with <strong>Hibernate Spatial</strong> 5.0.12 and trying to persist a <code>com.vividsolutions.jts.geom.Geometry</code> object to an <strong>Oracle</strong> database with <code>SDO_GEOMETRY</code> column but get this exception when trying to save it to the db:</p>
  
  <pre><code>ORA-00932: Inconsistent datatypes: expected MDSYS.SDO_GEOMETRY got BINARY
  </code></pre>
  
  <p>I haven't found this problem anywhere else and have no idea how to solve it as I'm new to hibernate.</p>
  
  <p>This is the entity I'm trying to save:</p>
  
  <pre><code>@Entity
  @Table(name = "DETECTED_OBJECTS")
  public class DetectedObject {
      @Id
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "DETECTED_SEQ")
      @SequenceGenerator(sequenceName = "detected_seq", allocationSize = 1, name = "DETECTED_SEQ"_
      private Long id;
      private Geometry polygon;
  
      public DetectedObject(){}
  
      public DetectedObject(Coordinate[] coordinates){
      this.polygon = new GeometryFactory().createPolygon(coordinates);
      }
  }
  </code></pre>
  
  <p>And this is my hibernate config:</p>
  
  <pre><code>spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
  spring.jpa.properties.provider_class = org.hibernate.cache.NoCacheProvider
  spring.jpa.hibernate.ddl-auto = update
  spring.jpa.properties.hibernate.format-sql = true
  </code></pre>
  
  <p>And the actual line that throws the exception:</p>
  
  <pre><code>detectedObjectRepository.save(detectedObject)
  </code></pre>