Skip to content

Commit 394fe38

Browse files
committed
replace confusing sql like string
1 parent e17caa3 commit 394fe38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/site/xdoc/java-api.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ int update(String statement, Object parameter)
202202
int delete(String statement, Object parameter)]]></source>
203203
<p>The difference between selectOne and selectList is only in that selectOne must return exactly one object or null (none). If any more than one, an exception will be thrown. If you don't' know how many objects are expected, use selectList. If you want to check for the existence of an object, you're better off returning a count (0 or 1). The selectMap is a special case in that it is designed to convert a list of results into a Map based on one of the properties in the resulting objects. Because not all statements require a parameter, these methods are overloaded with versions that do not require the parameter object.</p>
204204
<p>A Cursor offers the same results as a List, except it fetches data lazily using an Iterator.</p>
205-
<source><![CDATA[try (Cursor<MyEntity> entities = session.selectCursor("select ...", param)) {
205+
<source><![CDATA[try (Cursor<MyEntity> entities = session.selectCursor(statement, param)) {
206206
for (MyEntity entity:entities) {
207207
// process one entity
208208
}

0 commit comments

Comments
 (0)