我有一个域如下:
class Author {
String id
static hasMany = [accounts: Account]
static belongsTo = Account
static mapping = {
accounts joinTable: [name: "SOMETABLE", key: 'SOMEFIELD'],
ignoreNotFound: true
}
static constraints = {}
}
找不到记录时出现以下错误。我尝试了ignoreNotFound,它不起作用。
error message: accounts=org.hibernate.ObjectNotFoundException:
No row with the given identifier exists:
[com.myapplication.Account#123465489785]
当尝试选择连接 2 条您无权插入数据库的记录时会发生这种情况。请问有解决办法吗?