Here is a snippet of configuration code from our .hbm.xml file:
Code:
<hibernate-mapping>
<class name="com.fubar.dao.Campaign" table="MSG_CAMPAIGN">
<id name="id" column="CAMPAIGN_ID" type="int" unsaved-value="0">
<generator class="sequence">
<param name="sequence">MSG_CAMPAIGN_SEQ</param>
</generator>
</id>
<property name="type" column="CAMPAIGN_TYPE" />
<property name="name" column="CAMPAIGN_NAME" />
<property name="namespaceId" column="NAMESPACE_ID" />
<many-to-one name="client"
class="com.fubar.dao.Client"
column="MSG_CLIENT_ID" />
<set name="shortcodes" inverse="true">
<key column="CAMPAIGN_ID"/>
<one-to-many class="com.fubar.dao.Shortcode"/>
</set>
<set name="properties" inverse="true">
<key column="CAMPAIGN_ID"/>
<one-to-many class="com.fubar.dao.Property"/>
</set>
</class>
My question is, can I, through programmatic means perhaps through the Configuration object, access the sequence parameter value of the sequence generator for the id field of this class, and if so, how?[/code]