title: Entity with EmbeddedId throw EntityNotFoundException when refreshing
body: <p>I'm facing a weird issue : EntityNotFoundException keeps being thrown when I refresh an entity with embedded id.</p>
  
  <p>The code :</p>
  
  <pre><code>@Entity
  public class A {
      @EmbeddedId
      private APk pk;
  
      public A(int id, Date date) {
          pk = new APk(id, date);
      }
  
      ...
  }
  
  @Embeddable
  public class APk {
      private int id;
  
      @Temporal(TemporalType.TIMESTAMP)
      private Date date;
  
      ...
  }
  </code></pre>
  
  <p>Then, in an EJB method :</p>
  
  <pre><code>A entity = new A(1, new Date());
  
  em.persist(entity);
  em.flush();
  em.refresh(entity); -&gt; here's where the exception is thrown
  </code></pre>
  
  <p>Stacktrace :</p>
  
  <pre><code>javax.persistence.EntityNotFoundException: Entity no longer exists in the database: [id=1, date=25-07-2013 15:02].
  </code></pre>
  
  <p>I'm using Glassfish v3.1.2 with Eclipse Link 2.4.2 as JPA provider (but it did the same with embedded provider).</p>
  
  <p>Could you help me please?</p>
  
  <p>Thanks.</p>