I have a domain as follow:
class Author {
String id
static hasMany = [accounts: Account]
static belongsTo = Account
static mapping = {
accounts joinTable: [name: "SOMETABLE", key: 'SOMEFIELD'],
ignoreNotFound: true
}
static constraints = {}
}
I get the following error when no record are found. I tried the ignoreNotFound, it not working.
error message: accounts=org.hibernate.ObjectNotFoundException:
No row with the given identifier exists:
[com.myapplication.Account#123465489785]
it happens when trying to select join 2 records that you dont have access to insert in the db. Is there a workaround, please?