Menu

I can specified two field to primary key

2004-09-07
2004-09-07
  • Nobody/Anonymous

    I can specified two field to primary key

     
    • Richard Banks

      Richard Banks - 2004-09-07

      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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.