title: Hibernate Criteria for inner join full entity class field
body: <p>My Entity Model Class are</p>
  
  <pre><code>------- A -----------
  private static final long serialVersionUID = 1L;
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      @Column(name = "NameA")
      private String nameA;
  
      public B getBid() {
          return b;
      }
  
      public void setBid(B bid) {
          this.b = bid;
      }
  
      public String getNameA() {
          return nameA;
      }
  
      public void setNameA(String nameA) {
          this.nameA = nameA;
      }
      @JoinColumn(name = "BID", referencedColumnName = "ID")
      @ManyToOne(fetch= FetchType.LAZY)
      private B b;
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  --------------------------------------------
  ------------------ B -----------------------
  
  private static final long serialVersionUID = 1L;
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      @Column(name = "NameB")
      private String nameB;
  
  
      public String getNameB() {
          return nameB;
      }
  
      public void setNameB(String nameB) {
          this.nameB = nameB;
      }
  
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  </code></pre>
  
  <p>and 
  I want to 
  make this Query <code>session.createQuery("select a.b from A a").list();</code></p>
  
  <p>with Criteria API ????</p>