title: Null or zero primary key encountered in unit of work clone
body: <p>I am facing a common but irritating problem in eclipseLink. I am just trying to run this query using eclipseLink:</p>
  
  <p>List organizationUnitEntityList = entityManager.createQuery("select o from OrganizationUnitEntity o where o.unitId=?1").setParameter(1, userTypeDomain.getUnitId()).getResultList();
  OrganizationUnitEntity organizationUnitEntity = organizationUnitEntityList.get(0);</p>
  
  <p>// 1 is passed as parameter</p>
  
  <p>OrganizationUnitEntity is :</p>
  
  <p>public class OrganizationUnitEntity {</p>
  
  <pre><code>@Id
  private int unitId;
  private String unit;
  
      getters and setters...
  </code></pre>
  
  <p>}</p>
  
  <p>But the exception that I am getting is :
  Null or zero primary key encountered in unit of work clone </p>
  
  <p>Now, as there is no null or 0 primary key in the database, why this one is coming??</p>