Menu

Mapping association in the same table

2004-11-26
2013-03-07
  • Nobody/Anonymous

    Hello,
    Firstable, a great thanks for the project team and the great work that they fulfilled. Good job guys.

    I'm trying to use the Atomsframework in a Functional Analysis Tool (regarding european norm for the Functional Analysis methodology), that I will propose for the community, I'm sure that it could be a great help for solution design.
    If someone want to participate for this future SourceForge Projet thanks to email me at : tlamak@yahoo.fr. Any participation will be welcome.

    I have a question about mapping association in the same table.
    I have a table VA_Function

    - <class name="VA_FUNCTION" table="VA_FUNCTION" database="MICROSOF-SB7N5E">
      <attribute name="Internal_ref_number" column="Internal_ref_number" key="primary" />
      <attribute name="Function_number" column="Function_number" key="primary" />
      <attribute name="Description" column="Description" />
      <attribute name="Weight" column="Weight" />
      <attribute name="Number_of_descendant" column="Number_of_descendant" />
      <attribute name="Function_level" column="Function_level" />
      <attribute name="Type" column="Type" />
      <attribute name="Name" column="Name" />
      <attribute name="Father_ref" column="Father_ref" />
      <attribute name="Father_func" column="Father_func" />
      <attribute name="Sort" column="Sort" />
      </class>

    As you can see a function father is linked to a child function in the same table with a reference back : "father_func" propriety.
    I have no need of another table, it's a OneToMany association.
    Should I add an association map in the mapping file ? in the two navigation possibilities ?
    from the father function to a child function
    and from child function to a father  function ?
    Thanks for the answer.

     
    • Richard Banks

      Richard Banks - 2004-12-02

      I've answered this in the forums on jcframework.sourceforge.net.

      (Thanks for the positive feedback by the way - it's appreciated)

       

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.