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!