title: Unable to locate Attribute with the the given name [XXX] on this ManagedType [unknown]
body: <p>I have this entity with its ID defined in Identifiable class.</p>
  
  <p>InventoryLoad has InventoryLoadID as its PK</p>
  
  <pre><code>public class InventoryLoad extends AbstractIdentifiable&lt;InventoryLoadId&gt; implements Auditable {
  
      @OneToMany(mappedBy = "inventoryLoad")
      private Set&lt;InventorySubLoad&gt; inventorySubLoads = Sets.newLinkedHashSet();
  
      @ManyToOne(fetch = FetchType.LAZY, optional = false)
      @JoinColumns({
              @JoinColumn(name = "stoloc", referencedColumnName = "stoloc"),
              @JoinColumn(name = "wh_id", referencedColumnName = "wh_id")
      })
      private Location location;
  
      @Column(name = "lodwgt")
      private Double loadWeight;
  
      @Column(name = "prmflg")
      private Boolean permanentLoadSubFlag;
  }
  
  </code></pre>
  
  <p>This is the ID for above class</p>
  
  <pre><code>@Embeddable
  public class InventoryLoadId extends AbstractIdentifiableId {
      private static final long serialVersionUID = 1L;
  
  
      @Column(name = "lodnum")
      private String loadNumber;
  
      // some another code below
  }
  </code></pre>
  
  <p>I am using Criteria builder to get to the column of ID class.</p>
  
  <p>To get this using Path to get the path of inventoryid that is PK.</p>
  
  <pre><code>Session session = new HibernateTools().getSession();
  
  CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();
  CriteriaQuery&lt;Object[]&gt; criteriaQuery = criteriaBuilder.createQuery(Object[].class);
  
  Root&lt;InventoryLoad&gt; inventoryLoadRoot = criteriaQuery.from(InventoryLoad.class);
  Path&lt;InventoryLoadId&gt; inventoryLoadIdPath = inventoryLoadRoot.get("id");
  criteriaQuery.multiselect(inventoryLoadIdPath.get("loadNumber"),
  </code></pre>
  
  <p>Getting this error</p>
  
  <p><code>Unable to locate Attribute  with the the given name [loadNumber] on this ManagedType [unknown]</code></p>