Home > database >  Encountered the query results in use mybatis total=0, but can check the database
Encountered the query results in use mybatis total=0, but can check the database

Time:09-16

CodePudding user response:

Execute the statement is the same?

CodePudding user response:

If there is a grammar differences lead to the result

CodePudding user response:

There is a middle query result set

CodePudding user response:

Execute the statement is the same, in mybatis return is total=0, but copied to the database data

CodePudding user response:

Open SqlProfiler directly tracking mybatis real statement execution

CodePudding user response:

This tool cannot download,,,

CodePudding user response:

Which version are you using?
SqlProfiler is SQL Server's own, need not download,

CodePudding user response:

SQL server5.7

CodePudding user response:

Solve the building Lord, I am out of the question

CodePudding user response:

Dependence is mybatis_spring version such as mybatis or spring JDBC version there is no corresponding

CodePudding user response:

https://blog.csdn.net/gnail_oug/article/details/77163424https://blog.csdn.net/gnail_oug/article/details/77163424

CodePudding user response:

The
reference 11 floor x934622151 reply:
https://blog.csdn.net/gnail_oug/article/details/77163424https://blog.csdn.net/gnail_oug/article/details/77163424


Perfect resolve my problem!!!!!!

CodePudding user response:

Pro, just success, # $

CodePudding user response:

Big website can send it again

CodePudding user response:

Difference between # $mybatis, # {} in pretreatment, part of the parameter with a placeholder? "" Instead, behind the assignment again, ${} is just a simple string substitution, like string concatenation so should be replaced with ${} once, but this way is not safe, have problem of SQL injection, unsafe, recommend use # {}

CodePudding user response:

Could you tell me how to solve, I also am in sq can come out but in mybatis out not come
  • Related