-->
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: oracle sequence for not id property
PostPosted: Wed Nov 05, 2008 9:54 am 
Beginner
Beginner

Joined: Wed Dec 06, 2006 6:24 am
Posts: 24
Location: Bangalore
Hi,

I have a requirement like i need to use the value generated by oracle sequence for a property.

eg:
Code:
Class Test{

private String testId;
private String testName;
private String testingEntityId;
private String testSeqNum;

..... setter and getter methods.....
}

mapping file...

<class name="Test" table="Test">
     <id name="testId" type="string">
            <column name="TEST_ID" length="15" />

            <generator class="sequence">
         <param name="sequence">TEST_SEQ</param>
       </generator>
        </id>
     <property name="testName" type="string">
          <column name="TEST_NAME" not-null="true"/>
     </property>

     <property name="testingEntityId" type="string">
          <column name="TEST_ENTITY_ID" not-null="true"/>
     </property>
   
    <property name="testSeqNum" type="string">
          <column name="TEST_SEQ_NUM" not-null="true"/>
     </property>

</class>




for testSeqNum property i would like to input the sequence generated by other oracle sequnce say.. TEST_SEQ_GEN.

please tell me how to do this mapping....

Thanks in advance

_________________
Vinay N


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.