-->
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.  [ 2 posts ] 
Author Message
 Post subject: How do I set separators for a string generated by uuid.hex?
PostPosted: Sun Feb 27, 2005 7:43 pm 
Newbie

Joined: Fri Feb 20, 2004 9:46 am
Posts: 7
Location: Brazil
According to the Javadocs for Class UUIDHexGenerator, it is possible to set separators between each component of the UUID. How do I set this? What is the order they appear?

Hibernate version: 2.1.7

I suppose this is going to take the form:

Code:
<id name="id" type="string" unsaved-value="null" >
    <column name="id" sql-type="char(32)" not-null="true"/>
    <generator class="uuid.hex" >
        <param ???here is my question
    </generator>
</id>


Name and version of the database: Mysql 3.23.58

Thanks in advance.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 28, 2005 7:22 am 
Newbie

Joined: Fri Feb 20, 2004 9:46 am
Posts: 7
Location: Brazil
I found one of the answers myself.

From the documentation:
Quote:
The UUIDs contain: IP address, startup time of the JVM (accurate to a quarter second), system time and a counter value (unique within the JVM). It's not possible to obtain a MAC address or memory address from Java code, so this is the best we can do without using JNI.


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