jpa - Entity with EmbeddedId throw EntityNotFoundException when refreshing -


i'm facing weird issue : entitynotfoundexception keeps being thrown when refresh entity embedded id.

the code :

@entity public class {     @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;      ... } 

then, in ejb method :

a entity = new a(1, new date());  em.persist(entity); em.flush(); em.refresh(entity); -> here's exception thrown 

stacktrace :

javax.persistence.entitynotfoundexception: entity no longer exists in database: [id=1, date=25-07-2013 15:02]. 

i'm using glassfish v3.1.2 eclipse link 2.4.2 jpa provider (but did same embedded provider).

could me please?

thanks.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -