diff --git a/mapper/src/main/java/io/mybatis/mapper/example/Example.java b/mapper/src/main/java/io/mybatis/mapper/example/Example.java
index 90315d6..84dcb3b 100644
--- a/mapper/src/main/java/io/mybatis/mapper/example/Example.java
+++ b/mapper/src/main/java/io/mybatis/mapper/example/Example.java
@@ -1382,13 +1382,9 @@ protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
- public String variables(String prefix, String field) {
+ public String variables(String field) {
StringBuilder variables = new StringBuilder();
- variables.append("#{");
- if(prefix != null && !prefix.isEmpty()) {
- variables.append(prefix).append(".");
- }
- variables.append(field);
+ variables.append("#{").append(field);
if (typeHandler != null && !typeHandler.isEmpty()) {
variables.append(",typeHandler=").append(typeHandler);
}
diff --git a/mapper/src/main/java/io/mybatis/mapper/example/ExampleProvider.java b/mapper/src/main/java/io/mybatis/mapper/example/ExampleProvider.java
index 2f91966..c6fed7d 100644
--- a/mapper/src/main/java/io/mybatis/mapper/example/ExampleProvider.java
+++ b/mapper/src/main/java/io/mybatis/mapper/example/ExampleProvider.java
@@ -37,7 +37,7 @@ public class ExampleProvider {
" ${setValue.condition},\n" +
" \n" +
" \n" +
- " ${setValue.condition} = ${setValue.variables('setValue', 'value')},\n" +
+ " ${setValue.condition} = ${setValue.variables('setValue.value')},\n" +
" \n" +
" \n" +
" \n" +
@@ -48,17 +48,17 @@ public class ExampleProvider {
" AND ${criterion.condition}\n" +
" \n" +
" \n" +
- " AND ${criterion.condition} ${criterion.variables('criterion', 'value')}\n" +
+ " AND ${criterion.condition} ${criterion.variables('criterion.value')}\n" +
" \n" +
" \n" +
- " AND ${criterion.condition} ${criterion.variables('criterion', 'value')} AND\n" +
- " ${criterion.variables('criterion', 'secondValue')}\n" +
+ " AND ${criterion.condition} ${criterion.variables('criterion.value')} AND\n" +
+ " ${criterion.variables('criterion.secondValue')}\n" +
" \n" +
" \n" +
" AND ${criterion.condition}\n" +
" \n" +
- " ${criterion.variables(null, 'listItem')}\n" +
+ " ${criterion.variables('listItem')}\n" +
" \n" +
" \n";