search

Home  >  Q&A  >  body text

java - mybatis update失败却不报错

怪我咯怪我咯2820 days ago1189

reply all(5)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:38:41

    I don’t know if you have configured the console output and the configuration of the sql statement issued. If you have configured it, you can check whether there is any problem with the sql statement issued

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 10:38:41

    If an error occurs, an exception should be thrown. If the update number is 0, it can only mean that no data has been updated. Generally speaking, there are two reasons: one is that the data to be updated is not found according to the WHERE condition; the other reason is that it is found, but the new data and the data stored in the database are different. the same.

    reply
    0
  • 迷茫

    迷茫2017-04-18 10:38:41

    I am also very good, maybe you can write out the type resultType returned by update

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:38:41

    When running, the console will output the actual SQL during execution. Check carefully to see if there are any problems, or copy it to DBMS for execution

    reply
    0
  • 阿神

    阿神2017-04-18 10:38:41

    If there is no exception, it means that the update where condition is not established and there is no record that meets the update condition

    reply
    0
  • Cancelreply