In the following function, if I add a multi-line comment then the code doesn't compile. Why?
def updateValues(tableName:String, model:User, id:UserKeys):Update.Where = {
QueryBuilder.update(tableName).`with`/*WORKS*/(QueryBuilder.set("confirmed",model.profile.internalProfileDetails.get.confirmed))/*(QueryBuilder.set("authprovider",model.profile.internalProfileDetails.get.loginInfo.providerID)) //TODOM - remove hardcoding for bucket and also add bucket in User model*/
.and(QueryBuilder.set("id",model.id))
.and(QueryBuilder.set("password",model.profile.internalProfileDetails.get.passwordInfo.get.password))
.and(QueryBuilder.set("hasher",model.profile.internalProfileDetails.get.passwordInfo.get.hasher))
.and(QueryBuilder.set("salt",""/*model.profile.internalProfileDetails.get.passwordInfo.get.salt.get*/)) //salt is empty for BCryptSha256PasswordHasher. The 'hash' method of BCryptSha256PasswordHasher does not return the salt separately because it is embedded in the hashed password.
.where(QueryBuilder.eq("bucket", id.bucket)) //TODOM - pick column names from config/env file
.and(QueryBuilder.eq("email", id.email))
.and(QueryBuilder.eq("authprovider", model.profile.internalProfileDetails.get.loginInfo.providerID))//TODOM - this should come from id
.and(QueryBuilder.eq("firstname",model.profile.externalProfileDetails.firstName))
.and(QueryBuilder.eq("lastname",model.profile.externalProfileDetails.lastName))
}
But
def updateValues(tableName:String, model:User, id:UserKeys):Update.Where = {
QueryBuilder.update(tableName).`with`/*
DOESNT WORKS. I get error, cannot resolve and */(QueryBuilder.set("confirmed",model.profile.internalProfileDetails.get.confirmed))/*(QueryBuilder.set("authprovider",model.profile.internalProfileDetails.get.loginInfo.providerID)) //TODOM - remove hardcoding for bucket and also add bucket in User model*/
.and(QueryBuilder.set("id",model.id))
.and(QueryBuilder.set("password",model.profile.internalProfileDetails.get.passwordInfo.get.password))
.and(QueryBuilder.set("hasher",model.profile.internalProfileDetails.get.passwordInfo.get.hasher))
.and(QueryBuilder.set("salt",""/*model.profile.internalProfileDetails.get.passwordInfo.get.salt.get*/)) //salt is empty for BCryptSha256PasswordHasher. The 'hash' method of BCryptSha256PasswordHasher does not return the salt separately because it is embedded in the hashed password.
.where(QueryBuilder.eq("bucket", id.bucket)) //TODOM - pick column names from config/env file
.and(QueryBuilder.eq("email", id.email))
.and(QueryBuilder.eq("authprovider", model.profile.internalProfileDetails.get.loginInfo.providerID))//TODOM - this should come from id
.and(QueryBuilder.eq("firstname",model.profile.externalProfileDetails.firstName))
.and(QueryBuilder.eq("lastname",model.profile.externalProfileDetails.lastName))
}