The content of element type "collection" must match "(constructor?,id*,result*,association*,collec
今天应用MyBatis进行数据库一对多,一对一查询的时候,出现了一个错误:
The content of element type "collection" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".
源代码为:
出错原因,当出现一对一,一对多的时候,并且这两个是并列的时候,需要先写一对一:association,再写一对多:collection
修改后的代码: