-->
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.  [ 3 posts ] 
Author Message
 Post subject: Using Hibernate with (Oracle) Spatial
PostPosted: Mon Nov 20, 2006 6:02 pm 
Newbie

Joined: Mon Nov 20, 2006 3:46 pm
Posts: 1
Hi,

My company is looking at using Hibernate and Oracle Spatial but I can't find much information on mixing the two together.

So let's start with the questions

1) Has anyone done something like this before? How well did it work?

2) How well does Hibernate support the SDO_GEOMETRY dataypes? From what I can see, I have use UserTypes to implement support SDO_GEOMETRY. Is this the preferred way to do it?

3) Is there any documentation for using Hibernate with Spatial data?

Thanks,

Mark


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

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

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 11, 2007 12:22 pm 
Newbie

Joined: Tue Sep 11, 2007 12:15 pm
Posts: 1
Thanks for the code!

Would like to note that the line:

OracleConnection oc = (OracleConnection) preparedStatement.getConnection();

seems to fail in many cases (gathered info from various other topics here) if using container managed data-source (pooled/proxied - so the getConnection() returns something different than an OracleConnection).

The simplest solutions (which works at least for OC4J app server) is to use:

...preparedStatement.getConnection().getMetaData().getConnection();

Cheers.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.