I have issue related batchDelete in jooq. I have a list folderProcessChecklistRecordListin my code given below .But the issue is that convert list into UpdatableRecord .Because of batchDelete argument required UpdatableRecord .

Error:

The method batchDelete(UpdatableRecord...) in the type Transaction is not applicable for the arguments (List)

Code here:

public void deleteFolderProcessChecklist(String folderType, List<FolderProcessChecklistRecord> folderProcessChecklistRecordList) throws ProcessCheckListException{

        if(UserSubject.current().hasPermission(folderType, ButtonPermissionCode.FOLDER_PROCESS_CHECKLIST_DELETE)){
            Transaction.current().batchDelete(folderProcessChecklistRecordList));
        }else{
            throw new ProcessCheckListException();
        }
    }

Can anyone tell me:

How to convert the list into updatablerecord ?

有帮助吗?

解决方案

There are a couple of potential problems here:

Your record simply isn't an UpdatableRecord

Are you sure that your FolderProcessChecklistRecord is an UpdatableRecord? Otherwise, you couldn't pass it to either batchDelete() method

Your Transaction.current() object doesn't implement all of DSLContext

jOOQ ships with overloaded DSLContext.batchDelete() methods:

From other questions (by your coworkers?), I suspect that your custom Transaction type might not correctly implement DSLContext.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top