Skip to content

Commit

Permalink
fix: 조회하는 부분에서, rs.next 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hong-sile committed Sep 26, 2023
1 parent 68029ad commit 7ffbb6f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ public <T> T executeQuery(
setPreparedStatement(pstmt, objects);
final ResultSet rs = pstmt.executeQuery();
log.debug("query : {}", sql);
return mapper.map(rs);
if (rs.next()) {
return mapper.map(rs);
}
return null;
} catch (SQLException e) {
log.error(e.getMessage(), e);
throw new RuntimeException(e);
Expand Down

0 comments on commit 7ffbb6f

Please sign in to comment.