Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-713

Reverse-side of self-referenced entity not generated

XMLWordPrintable

      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.

              rhn-support-ggastald George Gastaldi
              fans_rht fans jboss (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: