assertEquals(1,historyService.createNativeHistoricProcessInstanceQuery().sql("SELECT count(*) FROM "+managementService.getTableName(HistoricProcessInstance.class)).count());
assertEquals(1,historyService.createNativeHistoricProcessInstanceQuery().sql("SELECT * FROM "+managementService.getTableName(HistoricProcessInstance.class)).list().size());
// assertEquals(1, historyService.createNativeHistoricProcessInstanceQuery().sql("SELECT * FROM " + managementService.getTableName(HistoricProcessInstance.class)).listPage(0, 1).size());
assertEquals(1,historyService.createNativeHistoricTaskInstanceQuery().sql("SELECT count(*) FROM "+managementService.getTableName(HistoricProcessInstance.class)).count());
assertEquals(1,historyService.createNativeHistoricTaskInstanceQuery().sql("SELECT * FROM "+managementService.getTableName(HistoricProcessInstance.class)).list().size());
assertEquals(1,historyService.createNativeHistoricTaskInstanceQuery().sql("SELECT * FROM "+managementService.getTableName(HistoricProcessInstance.class)).listPage(0,1).size());
assertEquals(1,historyService.createNativeHistoricActivityInstanceQuery().sql("SELECT count(*) FROM "+managementService.getTableName(HistoricProcessInstance.class)).count());
assertEquals(1,historyService.createNativeHistoricActivityInstanceQuery().sql("SELECT * FROM "+managementService.getTableName(HistoricProcessInstance.class)).list().size());
assertEquals(1,historyService.createNativeHistoricActivityInstanceQuery().sql("SELECT * FROM "+managementService.getTableName(HistoricProcessInstance.class)).listPage(0,1).size());
@@ -1241,6 +1241,11 @@ public class ExecutionQueryTest extends PluggableActivitiTestCase {
assertEquals(executionCount,runtimeService.createNativeExecutionQuery().sql("SELECT * FROM "+managementService.getTableName(Execution.class)).list().size());
assertEquals(executionCount,runtimeService.createNativeExecutionQuery().sql("SELECT count(*) FROM "+managementService.getTableName(Execution.class)).count());
}
publicvoidtestNativeQueryPaging(){
assertEquals(5,runtimeService.createNativeExecutionQuery().sql("SELECT * FROM "+managementService.getTableName(Execution.class)).listPage(1,5).size());
assertEquals(1,runtimeService.createNativeExecutionQuery().sql("SELECT * FROM "+managementService.getTableName(Execution.class)).listPage(2,1).size());
@@ -1292,4 +1292,8 @@ public class ProcessInstanceQueryTest extends PluggableActivitiTestCase {
assertEquals(piCount,runtimeService.createNativeProcessInstanceQuery().sql("SELECT * FROM "+managementService.getTableName(ProcessInstance.class)).list().size());
assertEquals(piCount,runtimeService.createNativeProcessInstanceQuery().sql("SELECT count(*) FROM "+managementService.getTableName(ProcessInstance.class)).count());
}
publicvoidtestNativeQueryPaging(){
assertEquals(5,runtimeService.createNativeProcessInstanceQuery().sql("SELECT * FROM "+managementService.getTableName(ProcessInstance.class)).listPage(0,5).size());