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