Skip to content

Commit 3e89368

Browse files
committed
update ModelMapper to use correct primaryKeyName variable in pk methods
1 parent 56af2f6 commit 3e89368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/retrorock/theory/helpers/ModelMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ public ModelMapper setPrimaryKeyName(String primaryKeyName) {
108108

109109
public ModelMapper pk(Integer id) {
110110
ArrayList<String> fields = new ArrayList<String>();
111-
fields.add(tableAlias+"."+primaryKey+" = " + id);
111+
fields.add(tableAlias+"."+primaryKeyName+" = " + id);
112112
this.where(fields);
113113
return this;
114114
}
115115

116116
public ModelMapper pk(String id) {
117117
ArrayList<String> fields = new ArrayList<String>();
118-
fields.add(tableAlias+"."+primaryKey+" = '" + id + "'");
118+
fields.add(tableAlias+"."+primaryKeyName+" = '" + id + "'");
119119
this.where(fields);
120120
return this;
121121
}

0 commit comments

Comments
 (0)