Generate MyBatis ResultMap Tag
How to use
Prerequisite: The mouse cursor must be within aJavaclass orXMLfile with properties.Usage: Right-click to open the context menu, then click Extended Features... >> Generate ResultMap Tag.Default shortcut key: Ctrl + Alt + 7 >> then press 2.
Note
When the mouse cursor is in a
Javaclass, the current Java class will be used as the mapping class by default, and the generatedResultMaptag will be copied to the clipboard.When the mouse cursor is in an
XMLfile, you need to select a Java class. The selected Java class will be used as the mapping class, and the generatedResultMapwill be directly inserted at the mouse cursor position.
Code Examples
// Avoid using SELECT *.
// Only the fields part after SELECT is needed.
SELECT id, name, age
// SQL fields correspond to Java properties.
private Integer id;
private String name;
private Integer age;

Last modified: 18 June 2024