From 301087e5106cd575913ee94b4ee02282de720fcf Mon Sep 17 00:00:00 2001 From: Tony Wen <41454065@qq.com> Date: Wed, 5 Jun 2024 13:32:51 +0800 Subject: [PATCH] Fix entity name in MappingSqlQuery example of reference guide See gh-32957 --- .../modules/ROOT/pages/data-access/jdbc/object.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/data-access/jdbc/object.adoc b/framework-docs/modules/ROOT/pages/data-access/jdbc/object.adoc index 65fd60c76e0..8941d958300 100644 --- a/framework-docs/modules/ROOT/pages/data-access/jdbc/object.adoc +++ b/framework-docs/modules/ROOT/pages/data-access/jdbc/object.adoc @@ -112,7 +112,7 @@ Java:: this.actorMappingQuery = new ActorMappingQuery(dataSource); } - public Customer getCustomer(Long id) { + public Actor getActor(Long id) { return actorMappingQuery.findObject(id); } ---- @@ -123,11 +123,11 @@ Kotlin:: ---- private val actorMappingQuery = ActorMappingQuery(dataSource) - fun getCustomer(id: Long) = actorMappingQuery.findObject(id) + fun getActor(id: Long) = actorMappingQuery.findObject(id) ---- ====== -The method in the preceding example retrieves the customer with the `id` that is passed in as the +The method in the preceding example retrieves the actor with the `id` that is passed in as the only parameter. Since we want only one object to be returned, we call the `findObject` convenience method with the `id` as the parameter. If we had instead a query that returned a list of objects and took additional parameters, we would use one of the `execute`