Grails In Thread懒惰异常,同时接触联系人

时间:2013-09-09 06:48:34

标签: grails

//表单联系服务我正在单独的线程中尝试执行上载过程Thread.start {fileHandler Service.safe UploadedFile(allData)}

// now in save uploadFile Method i'm getting lazy exception while i'm trying to fethc the contact from the db 
// bu usging it's email id
Contact.withTransaction {
def isObjectExists=domainClassObj.createCriteria().get() {
eq primaryColumn,fileValue
fetchMode 'groups', FetchMode.EAGER
fetchMode 'playEvents', FetchMode.EAGER
}
}

 //contact domain has many    static hasMany = [groups: Group,playEvents:PlayEvent]
 and i'm getting lazy initialization on  group and playevents while fethcing the contact object 

0 个答案:

没有答案