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.  [ 1 post ] 
Author Message
 Post subject: Oracle PK Generator should supply byte Array
PostPosted: Tue Sep 04, 2007 4:45 am 
Newbie

Joined: Tue Jul 31, 2007 8:37 am
Posts: 12
Hi!

I'm using Hibernate 3 with a Oracle 9i Database.

In the following mapping file i use a generator with the guid class, that loads the generated primary key from the DB.


Code:
   <class name="ClassD"  table="TableD">
      <id name="id" column="tableD_ID" type="binary">
                  <generator class="guid"></generator>
      </id>

... other stuff....



All the primary keys in my legacy DB are Oracle RAW types. I tested to map this type to String and everything works fine. (only performance is very bad) So i changed the mapping to the binary type.

The loading and changing of entities works really fine (much more faster!!!) with the binary type, but now the problem is the creation of new entities.
The guid generator is implemented that it only supply a string. But what i need is a byte[]!

Now the question: Where is the best place to implement or perhaps to change the Hibernate Code so that the guid Generator gives back a byte[]?

thanks for the answers!


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

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.