I can specified two field to primary key
Yes, no problems at all.
Just mark each of the attributes in the primary key as key="primary".
For example:
<class name="A" table="TableA" database="DB"> <attribute name="AKey1" column="KeyCol1" key="primary" /> <attribute name="AKey2" column="KeyCol2" key="primary" /> <attribute name="Data1" column="Data1"/> <attribute name="Data2" column="Data2"/> <attribute name="CreatedDate" column="Created" timestamp="true" /> <attribute name="ModifiedDate" column="Modified" timestamp="true" /> </class>
- Richard.
Log in to post a comment.
I can specified two field to primary key
Yes, no problems at all.
Just mark each of the attributes in the primary key as key="primary".
For example:
<class name="A" table="TableA" database="DB">
<attribute name="AKey1" column="KeyCol1" key="primary" />
<attribute name="AKey2" column="KeyCol2" key="primary" />
<attribute name="Data1" column="Data1"/>
<attribute name="Data2" column="Data2"/>
<attribute name="CreatedDate" column="Created" timestamp="true" />
<attribute name="ModifiedDate" column="Modified" timestamp="true" />
</class>
- Richard.