Skip to content

Commit

Permalink
Fix typo in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhuizhaocom authored and filiphr committed Aug 11, 2023
1 parent 19f923e commit 98c0c95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docusaurus/docs/bpmn/ch04-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ There are two ways of querying data from the engine: the query API and native qu
Sometimes you need more powerful queries, for example, queries using an OR operator or restrictions you cannot express using the Query API. For these cases, we have native queries, which allow you to write your own SQL queries. The return type is defined by the Query object you use and the data is mapped into the correct objects (Task, ProcessInstance, Execution, …​). Since the query will be fired at the database you have to use table and column names as they are defined in the database; this requires some knowledge about the internal data structure and it is recommended to use native queries with care. The table names can be retrieved through the API to keep the dependency as small as possible.

List<Task> tasks = taskService.createNativeTaskQuery()
.sql("SELECT count(*) FROM " + managementService.getTableName(Task.class) +
.sql("SELECT * FROM " + managementService.getTableName(Task.class) +
" T WHERE T.NAME_ = #{taskName}")
.parameter("taskName", "gonzoTask")
.list();
Expand Down
2 changes: 1 addition & 1 deletion docs/userguide/src/zh_CN/bpmn/ch04-API.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ List<Task> tasks = taskService.createTaskQuery()
[source,java,linenums]
----
List<Task> tasks = taskService.createNativeTaskQuery()
.sql("SELECT count(*) FROM " + managementService.getTableName(Task.class) +
.sql("SELECT * FROM " + managementService.getTableName(Task.class) +
" T WHERE T.NAME_ = #{taskName}")
.parameter("taskName", "gonzoTask")
.list();
Expand Down

0 comments on commit 98c0c95

Please sign in to comment.