-->
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: Generator class SELECT using multiple properties
PostPosted: Fri Mar 09, 2007 7:26 am 
Newbie

Joined: Fri Mar 09, 2007 6:54 am
Posts: 1
I'm trying to map a legacy system that uses triggers to generate the primary key. I know that to be able to retreive the primary key I have to use the select generator and assign to it a unique value property. This is similar to the one shown below.

Code:
<id name="id" type="long" column="id">
        <generator class="select">
                <param name="key">someUniqueValueProperty</param>
        </generator>
</id>


However, the table i'm trying to map doesn't have any unique value property. Its uniqueness is determined by the combination of all its columns.

Is there a way to tell hibernate to load the id using multiple properties instead of just a single unique property? Or is there any other way around this problem?

Thanks in advance!


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.