Skip to content

Commit

Permalink
2.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sim-wangyan committed Feb 15, 2024
1 parent 85b4fa9 commit e330dd4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sqli-builder/src/main/java/io/xream/sqli/mapping/Mapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
package io.xream.sqli.mapping;

import io.xream.sqli.exception.ParsingException;
import io.xream.sqli.exception.SqlBuildException;
import io.xream.sqli.parser.BeanElement;
import io.xream.sqli.parser.Parsed;
import io.xream.sqli.parser.Parser;
import io.xream.sqli.util.ParserUtil;
Expand Down Expand Up @@ -117,8 +119,13 @@ default Class mapClzz(String key, Mappable mappable) {
}

Parsed parsed = mappable.getParsed();
if (parsed != null)
return parsed.getElement(key).getClz();
if (parsed != null) {
BeanElement lastTest = parsed.getElement(key);
if (lastTest == null) {
throw new SqlBuildException("not found property: " + key);
}
return lastTest.getClz();
}

return String.class;
}
Expand Down

0 comments on commit e330dd4

Please sign in to comment.