ktorm
ktorm copied to clipboard
Operator precedence issue
for example
Ts.update { it.companyTaxNo to companyTaxNo where { it.userId eq userId and it.deleted eq false } }
The format sql is 'where ((user_id=?) and is_deleted)=?'。
In mysql, the sql will affect all rows。
I know, we should use (it.userId eq userId) and (it.deleted eq false)。
But, I suggest ktorm to throw exception when users don't use the () 。
It is dangers for new hand.
Thanks,look forward for your reply !
Good suggestion, let's check if there is a good solution to avoid this.