3 Replies Latest reply on Dec 7, 2012 1:57 PM by George Gastaldi

    Reverse-side of self-referenced entity not generated

    fans_rht Newbie

      Forge 1.1.2.Final

       

      To create a self-referenced entity below,

       

      [myprj] myprj $ entity --named Employee

      [myprj] Employee.java $ field manyToOne --named boss --fieldType com.me.model.Employee.java --inverseFieldName bees

       

      [myprj] Employee.java $ cat ../Employee.java

       

      .....

       

      @Entity

      public class Employee implements Serializable

      {

       

       

         @Id

         private @GeneratedValue(strategy = GenerationType.AUTO)

         @Column(name = "id", updatable = false, nullable = false)

         Long id = null;

         @Version

         private @Column(name = "version")

         int version = 0;

       

       

         @ManyToOne

         private Employee boss;

       

        ......

       

       

      }

       

      The reverse side "bees" hasn't be generated at all.