-->
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: Could I work with Hibernate and OR Features of Oracle?
PostPosted: Thu Jul 15, 2004 3:59 pm 
Newbie

Joined: Thu Jul 15, 2004 3:15 pm
Posts: 1
I would like to know information about Hibernate support for Oracle.
Could I work with Hibernate and OR Features of Oracle?

For example, Oracle allows us to define types similar to the types of SQL. The syntax is
CREATE TYPE t AS OBJECT (
list of attributes and methods
);

Types can also be relation schemas.. etc.

Well, is there a way that I could use Hibernate with a database modeled with these features? Probably not, but I needed to ask.

I'm not sure I should use this type of features, but my DBA was asking if we could use that.

Thanks for any help!

_________________
Kelly Prudente Pereira


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 15, 2004 4:04 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Hibernate has currently no support for the proprietary object-relational extensions of Oracle (there is no ORM which can do that right now, but we might do something soon). The problem is JDBC. If you know how to access those features with JDBC, you can use them in Hibernate. Simply write a custom UserType that translates from Java type to SQL type (or does whatever kind of conversion you need).

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Re: Could I work with Hibernate and OR Features of Oracle?
PostPosted: Mon Jul 19, 2004 1:53 am 
Senior
Senior

Joined: Sat Jul 17, 2004 5:16 pm
Posts: 143
Kelly Prudente wrote:
I would like to know information about Hibernate support for Oracle.
Could I work with Hibernate and OR Features of Oracle?

For example, Oracle allows us to define types similar to the types of SQL. The syntax is
CREATE TYPE t AS OBJECT (
list of attributes and methods
);



First of all Types in Oracle are not "OR features". You still need to write insert and select (etc) statements to break the types does into relational tables, and you need to do this in PL/SQL. We use a custom tool to stream Java beans to PLSQL objects, for use in PLSQL, but it has many disadvantages (and we are moving fully to Hibernate). The point of Hibernate is not to map Java Objects to PLSQL objects which essentially means you are using a different programming language, but instead it eliminates marshaling the objects to the relational structure. Unless you are doing large reports or workflow calculations which need to process lots of data (and thus run in the DB processor), Hibernate is the way to go without Oracle Types.


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.