I am using hibernate spatial (geolatte with JTS) with an oracle database. I am creating a Geometry object with a polygon so it is being persisted as an SDO\_GEOMETRY object in the database. Currently all polygons are stored counter-clockwise with the SDO\_ETYPE in the SDO\_ELEM\_INFO\_ARRAY set to 1003 (exterior polygon ring). If I reverse the polygon and persist it the counter-clockwise orientation does not change.

So it appears that hibernate is enforcing this requirement or once the SDO\_GEOMETRY object is created the orientation is set.

I would like to control which orientation the polygons are saved in the database. Is this a hibernate setting? Do I need to store the polygons as holes (interior rings) when I create them instead of shells?

Thanks!