Skip to content

Commit b8602b1

Browse files
author
synapticloop
committed
closes 27; fixed multiple fields for fieldFinders
1 parent d9852d3 commit b8602b1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plugins {
1919
group = 'synapticloop'
2020
archivesBaseName = 'h2zero'
2121
description = """lightweight ORM generator for mysql, java and optionally jsp/servlets"""
22-
version = '1.4.3'
22+
version = '1.4.4'
2323

2424
// tasks.withType(Javadoc).all { enabled = false }
2525

src/main/java/synapticloop/h2zero/model/BaseSchemaObject.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,13 @@ private void generateAutomaticFinder(String uniqueFinder, boolean unique) throws
127127
String field = fields[i].trim();
128128
fieldNameBuilder.append(NamingHelper.getFirstUpper(field));
129129

130-
whereClauseBuilder.append(field);
131-
whereClauseBuilder.append(" = ?");
132130
if(i != 0) {
133-
whereClauseBuilder.append(", ");
131+
whereClauseBuilder.append(" and ");
134132
}
135133

134+
whereClauseBuilder.append(field);
135+
whereClauseBuilder.append(" = ?");
136+
136137
whereFieldsArray.put(field);
137138
}
138139

0 commit comments

Comments
 (0)