I have a table which has fileds like
OptionID,CustomAttributeID,DeptID,OptionType,OptionValue,Caption,HelpText
My table does not have a primary key.
Ineed to specify the value for all columns while inserting a new value for the table.
SO please let me know how my xml (mapping file)should look like.
I have written this is it correct?
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">
<class name="myVRM.DataLayer.vrmCustomAttributes, vrmDataLayer" table="Dept_CustomAttr_Option_D">
<id name="OptionID" column="OptionID" type="Int32" >
<generator class="assigned" />
</id>
<!-- Map properties I'd like to persist/fetch, assume column = propery name, and type is determined by reflection -->
<property name="CustomAttributeID"/>
<property name="DeptID"/>
<property name="OptionType"/>
<property name="OptionValue"/>
<property name="Caption"/>
<property name="HelpText"/>
</class>
</hibernate-mapping>
[/list]
|