今天应用MyBatis进行数据库一对多,一对一查询的时候,出现了一个错误:

The content of element type "collection" must match  "(constructor?,id*,result*,association*,collection*,discriminator?)".

源代码为:

The content of element type "collection" must match "(constructor?,id*,result*,association*,collec

出错原因,当出现一对一,一对多的时候,并且这两个是并列的时候,需要先写一对一:association,再写一对多:collection

修改后的代码:

The content of element type "collection" must match "(constructor?,id*,result*,association*,collec

相关文章:

  • 2021-08-21
  • 2022-01-30
  • 2022-12-23
  • 2021-09-19
  • 2021-07-23
  • 2022-01-14
  • 2021-06-09
  • 2021-07-22
猜你喜欢
  • 2021-04-13
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案