-->
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: composite-id with generator for each key-property
PostPosted: Tue Nov 22, 2011 6:38 am 
Newbie

Joined: Thu Aug 25, 2011 4:52 am
Posts: 5
Hi,

I have composite-id with two key-properties, which are generated by a sequence. So I need something like this:

Code:
<composite-id>
    <key-property name="id1">
        <column name="ID1"></column>
        <generator class="org.hibernate.id.SequenceGenerator">
            <param name="sequence">sequenceId1</param>
        </generator>
    </key-property>
    <key-property name="id2">
        <column name="ID2"></column>
        <generator class="org.hibernate.id.SequenceGenerator">
            <param name="sequence">sequenceId2</param>
        </generator>
    </key-property>
</composite-id>


This is not accepted by the schema. The element <composite-id> accepts one sub-element <generator>. However how can I use this with two or more key-properties to be generated?

Thanks for hints

Thomas


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.