-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Newbie - Mapping oracle spatial JGeomtery <-> sdo_geom
PostPosted: Wed Nov 02, 2005 3:13 pm 
Newbie

Joined: Wed Nov 02, 2005 1:17 pm
Posts: 13
Hibernate version:3.0

Has anyone figured out how to create a hibernate mapping file for mapping between oracle.spatial.geometry.JGeometry and an SDO_Geometry? Haven't been able to figure out how to do it with UserTypes

for instance I'd like to create a simple class something like the following:

import oracle.spatial.geometry.JGeometry;

public class Building {
private Long id;
private String label;
private oracle.spatial.geometry.JGeometry shape;

public Building() {}
.....

with a corresponding hibernate mapping file that would contain something like:


<hibernate-mapping>
<class name="Building" table="BUILDING">
<id name="id" column="ID" type="long">
<generator class="native"/>
</id>

<property name="label" type="string" length="100"/>
<property name="shape" type="JGeometry"/>

</class>
</hibernate-mapping>


that would create a table like what that produced by the following SQL:

CREATE TABLE Buildings (
id NUMBER PRIMARY Key,
label VARCHAR(100),
shape SDO_GEOMETRY)
storage (initial 1m);

Of course JGeometry is not a supported type and hibernate doesn't know anything about the SDO_Geometry. Does anyone know of a strategy to use or examples of how to do this?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 3:48 pm 
Newbie

Joined: Mon Jun 12, 2006 4:59 pm
Posts: 13
Here's how:

http://www.hibernate.org/Documentation/ ... oJGeometry


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.