Skip to content

Commit

Permalink
#2191: Bind parameters in the order they appear in the SQL statement
Browse files Browse the repository at this point in the history
  • Loading branch information
gjvoosten committed Apr 19, 2021
1 parent 074762a commit 5743893
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/mil/dds/anet/database/PositionDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ public int setPersonInPosition(String personUuid, String positionUuid) {
.createUpdate("/* positionSetPerson.remove1 */ UPDATE positions "
+ "SET \"currentPersonUuid\" = NULL, type = :type, \"updatedAt\" = :updatedAt "
+ "WHERE \"currentPersonUuid\" = :personUuid")
.bind("personUuid", personUuid).bind("type", DaoUtils.getEnumId(revokePrivilege(currPos)))
.bind("updatedAt", DaoUtils.asLocalDateTime(now)).execute();
.bind("type", DaoUtils.getEnumId(revokePrivilege(currPos)))
.bind("updatedAt", DaoUtils.asLocalDateTime(now)).bind("personUuid", personUuid)
.execute();

getDbHandle()
.createUpdate("/* positionSetPerson.remove2 */ INSERT INTO \"peoplePositions\" "
Expand Down

0 comments on commit 5743893

Please sign in to comment.