title: how can i get "one" OBJECT from "many" OBJECT in ManyToOne relationship? please help me?
body: <p>this is my java code :three entity including <code>CompanyTypeRelation ,CompanyType,Department</code></p>
  
  <pre><code>public class CompanyTypeRelation  implements java.io.Serializable {
  
     private static final long serialVersionUID = 4227115995926533087L;
     // Fields    
  
      private long id;
      private CompanyType companyType;
      private Department department;
      private long operator;
      private String operateTime;
      // the relationship
      @ManyToOne(fetch=FetchType.LAZY)
      @JoinColumn(name="company_type_id", nullable=false)
  
      public CompanyType getCompanyType() {
         return this.companyType;
      }
  
      public void setCompanyType(CompanyType companyType) {
        this.companyType = companyType;
      }
          // the relationship
      @ManyToOne(fetch=FetchType.LAZY)
      @JoinColumn(name="company_id", nullable=false)
  
      public Department getDepartment() {
         return this.department;
      }
  
      public void setDepartment(Department department) {
      this.department = department;
      }
      ..............
      other code:
  }
  </code></pre>
  
  <p>this is my query sql :</p>
  
  <pre><code>SELECT c 
  FROM com.hna.dt.orm.CompanyTypeRelation c 
  LEFT JOIN c.companyType ct LEFT JOIN c.department cd
  </code></pre>
  
  <p>can I  get <code>departmentName</code> from <code>Department</code> by the sql above?</p>