CURD



For the past CURD operation of mybatis, let me first briefly talk about the problems I encountered:
 1. One of the problems I encountered, everything was done, and the user information can be written into the data, but I just don’t know why The output of the user's ID is always NULL, but there is no error reminder. Then I started from the beginning, checked carefully, and still found no problem. After asking others, I found that my mybaties jar package could not be imported, that is The configration was not dealt with properly, so I went to sort it out. Finally, after the jar package was sorted out, the ID was still not extracted. Finally, I found the problem of mapper mapping, which has not been fixed. After the final debugging, the operation of CURD of my mybaties finally succeeded. ,
 2.. When the dynamic parameter type is a basic function or String, the role of #{} is only a placeholder, and anything can be filled in it. When the dynamic parameter type is an object of a custom type, #{} Fill in the property name of the object. resultType and resultmap refer to the closed object type for each record queried, not the result type of the query. So it can't be found directly, you need to find the trace from the log.
 3. Now I have encountered the association query of mybaties. I am still a little confused about the problems in the association query. I will try my best to break through it recently!

    I feel like I've been lazy lately, but I'll correct it right away! Hope the teacher will not be disappointed! Thanks!


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326036009&siteId=291194637