Error when generating mapper using generator plugin-generating multiple tables of information

Error message

Result Maps collection already contains value for…BaseResultMap

the reason

1. There are multiple tables with the same name in the database, and multiple resultMaps with id BaseResultMap are generated in mapper.xml.

2. Generate the code again without deleting the generated pojo and mapper.

Solution

1. If there are multiple tables with the same name in the database, delete the code of the other generated table whose id is BaseResultMap.

2. If it is generated repeatedly, delete all and then regenerate.

3. If you don't want to generate mappers for multiple tables with the same name, add them in the database connection information in generatorConfig.xml

	<property name="nullCatalogMeansCurrent" value="true"/>
Published 28 original articles · praised 0 · visits 722

Guess you like

Origin blog.csdn.net/William_GJIN/article/details/105430447