我有一个包含字符串类型主键的实体。该实体模型如下:
@Entity
public class MyEntity {
@Id
@Column(name="PR_KEY", unique=true)
private String prKey;
....
....
}
但是我面临说TypeMismatch的问题。
org.hibernate.TypeMismatchException: Provided id of the wrong type. Expected: class java.lang.String, got class java.lang.Long
达令说
FFIVE
相关分类