Typo in parameter names caused us several bugs in production that could be picked up earlier. For example we have table:
CREATE TABLE users (id SERIAL, email TEXT, name TEXT, country TEXT, state TEXT address TEXT);
Insert code might look like:
fluentJdbc.query().update(
"INSERT INTO user(email, name, country, state, address)" +
" VALUES (:email, :fullName, :county, :state, :address)")
.namedParam("email", request.getEmail())
.namedParam("name", request.getFullName())
.namedParam("country", request.getCountry())
.namedParam("state", request.getState())
.namedParam("address", request.getAddress())
.run();
No exception thrown in tests, although code has two bugs:
name doesn't match :fullName
:county is typo for :country
I can see that there was this check in previous version, and then it was removed. I wonder what problems it caused, maybe there is another solution that will allow to keep this validation? daf8343#diff-e0612eba839ffc6fa7d0ea686ebbe5133199025df224686564a13da7045c14a9L280
Typo in parameter names caused us several bugs in production that could be picked up earlier. For example we have table:
Insert code might look like:
No exception thrown in tests, although code has two bugs:
namedoesn't match:fullName:countyis typo for:countryI can see that there was this check in previous version, and then it was removed. I wonder what problems it caused, maybe there is another solution that will allow to keep this validation? daf8343#diff-e0612eba839ffc6fa7d0ea686ebbe5133199025df224686564a13da7045c14a9L280