GORM Stale对象异常

时间:2016-08-23 18:20:39

标签: grails gorm

将记录插入域对象时,我们收到错误:

Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) 
Stacktrace follows:
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)

我们有一个简单的域名:

User{
    String uid
    String firstName
    String lastName
}

在做的时候:

def user=new User(uid:"TestUser", firstName:"Test", lastName:"User")

我们收到了上述错误。

0 个答案:

没有答案