Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.1
Mapping documents:
<id name="wrkflowgroupmatchid" type="integer">
<column name="WRKFLOWGROUPMATCHID" precision="5" scale="0" />
<generator class="increment" />
</id>
<property name="memberid" type="integer">
<column name="MEMBERID" precision="5" scale="0" not-null="true" />
</property>
<property name="wrkflowgrouptypid" type="integer">
<column name="WRKFLOWGROUPTYPID" precision="5" scale="0" not-null="true" />
</property>
<property name="startdt" type="timestamp">
<column name="STARTDT" length="7" not-null="true" />
</property>
<property name="enddt" type="timestamp">
<column name="ENDDT" length="7" not-null="true" />
</property>
<property name="wrkflowgroupname" type="string">
<column name="WRKFLOWGROUPNAME" length="100" not-null="true" />
</property>
<property name="sequence" type="integer">
<column name="SEQUENCE" precision="5" scale="0" not-null="false" />
</property>
Name and version of the database you are using: Oracle 9i
Here is my table:
WorkFlowGroups
workflowgroupid
memberid
startdate
enddate
name
sequence
First, I ask that you please don't slam the normalization of the table, I have no control over that. :)
Now, onto the actual problem. In order for this table to work, workflowgroupid and memberid both have to be part of the key. However, when creating a new record I would like workflowgroupid to be incremented by Hibernate and memberid assigned by the user.
Is this mapping possible w/ Hibernate?
Thank you.