-->
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.  [ 4 posts ] 
Author Message
 Post subject: Generate value for a non-id field
PostPosted: Wed Nov 02, 2005 4:43 am 
Newbie

Joined: Wed Nov 02, 2005 4:29 am
Posts: 7
Hi,

When creating the id value to store in my table I use this:

<id name="id" column="TABLE">
<generator class="uuid.hex"/>
</id>

Is it possible to generate another value like this for another field in the table, not using the "id" method?

Regards

Pich


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 04, 2005 8:45 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Use Interceptor.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 04, 2005 12:56 pm 
Newbie

Joined: Wed Nov 02, 2005 4:29 am
Posts: 7
alesj wrote:
Use Interceptor.


Can you please be more specific on how you mean I should use it.

Regards

Pich


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 04, 2005 3:30 pm 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Are you familiar with the Interceptoin notion?

Simply write an Interceptor instance that intercepts your pojo instance and fills the specific property.


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