Skip to content

Commit

Permalink
Merge pull request #174 from vinumaddumage/fix-bugs
Browse files Browse the repository at this point in the history
Use integer type for app id placeholder with prepare statement
  • Loading branch information
AnuradhaSK authored Nov 1, 2022
2 parents 2aeacba + 15066db commit 90a1176
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public boolean isFragmentApplication(int applicationId) throws OrganizationManag
String prepStmt = JdbcUtils.isH2DB() ? IS_FRAGMENT_APPLICATION_H2 : IS_FRAGMENT_APPLICATION;
int isFragment = namedJdbcTemplate.fetchSingleRecord(prepStmt,
(resultSet, rowNumber) -> resultSet.getInt(1), namedPreparedStatement -> {
namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_SP_ID, Integer.toString(applicationId));
namedPreparedStatement.setInt(DB_SCHEMA_COLUMN_NAME_SP_ID, applicationId);
namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_METADATA_NAME, IS_FRAGMENT_APP);
namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_METADATA_VALUE, Boolean.TRUE.toString());
});
Expand Down

0 comments on commit 90a1176

Please sign in to comment.