-->
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: Fixed-width ID columns?
PostPosted: Tue Dec 28, 2004 10:24 pm 
Newbie

Joined: Thu May 06, 2004 8:14 pm
Posts: 18
I'm using 2.1.6 with DB2 8.1 and would like to use the uuid.hex scheme as a CHAR(32) instead of a VARCHAR(32), for performance reasons.

I've tried using a UserType with this:

Code:
    public int[] sqlTypes() {
        return new int[] { Types.CHAR };
    }

    public Class returnedClass() {
        return String.class;
    }


But it just creates a column of CHAR(1). Adding a <column> element to my mapping does not work either:

Code:
        <id
            name="id"
            type="com.webify.csa.hibernate.IDType"
            length="32"
            unsaved-value="null"
        >
                <column
                    name="id"
                    not-null="true"
                    sql-type="char(32)"
                />
            <generator class="uuid.hex">
            </generator>
        </id>


Is this possible?


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.