AnsweredAssumed Answered

Using both TaskQuery and NativeTaskQuery

Question asked by c.arunrathnakumar on Mar 30, 2013
Latest reply on Apr 15, 2013 by jbarrez
Is there any way that i can use createTaskQuery and createNativeTaskQuery for the same taskService Object?


TaskService taskService = engine.getTaskService();

taskService.createNativeTaskQuery().sql("select * from "+managementService.getTableName(Task.class)+" T where T.name_ ilike #{taskName}").parameter("taskName", "user task").list();


The objective is to get the tasks with name 'User Task' that are suspended..

Note: Why i use createNativeTaskQuery is that i use postgres database which does not support in-case sensitive search for taskQuery.taskNameLike

Currently, it is returning the tasks returned by taskQuery not nativetaskquery.

Can u suggest me a way.

Thanks and Regards,