It is utterly confusing to me that using tag assocation and attribute extends .
Here is the sql and the result.Basically i just want to select one permission with many roles.
Then,I using java class to resolve them.
4 records as expected.
So I created a dto to handle the duplicate records with 2 different solutions like this:
Solution one -- using assocation
mapper.xml
java bean
reulst:
Still return 4 records.
Solution two -- using extends attributes
mapper.xml
java bean
result:
Return 2 records with List
After using extends attribute, it working fine so far.
I was wandering can assocation do this like that?
Comment From: harawata
Hello @moyuking233 ,
I do not fully understand what you mean, but I think it is explained in the online documentation. https://mybatis.org/mybatis-3/zh_CN/sqlmap-xml.html#:~:text=%E9%9B%86%E5%90%88%E7%9A%84%E5%B5%8C%E5%A5%97%E7%BB%93%E6%9E%9C%E6%98%A0%E5%B0%84
We do not use GitHub issues for questions, so I am going to close. If you need further help, please post your question to the "discussions", mailing list or Stack Overflow. In any case, please try not to use images.