The reason why only one piece of data can be found in Mybatis one-to-many query

When using Mybatis for associated queries, be sure to avoid selecting "Table 1.id, Table 2.id..." with
duplicate column names. Once the primary key column names are duplicated, only one piece of data can be found, and
other columns are duplicated, causing data confusion. Make sure that the column names of each column are unique, make sure that the mapping is clear, and
there will be no errors when encapsulated into objects.
insert image description here

Guess you like

Origin blog.csdn.net/weixin_48011779/article/details/123667203