Hi Guys,
I am new to JPA and I could not understand why this in error. What I did in this could is to select the record to be updated but error happends.. Any ideas? I just one to update the record to be selected in customer entity.... thanks..
Error is:
Exception in
thread "main" java.lang.IllegalArgumentException: You have provided an instance of an incorrect PK class for this find operation. Class expected : class java.lang.Long, Class received : class java.lang.Integer.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.findInternal(EntityManagerImpl.java:729)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:653)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:532)
at com.main.Update.main(Update.java:24)