I know how to handle a one-to-many join in MyBatis using a mapper xml file with a result mapper with an embedded collection section. My understanding is that if there were a further one-to-many between the second and a third table, you could handle that by embedding yet another collection section within the first. However, my situation is a little different. I have table AAA in a one-to-many relationship with table BBB, but then table BBB is in a many-to-one relationship with table CCC, which in turn is in a one-to-many relationship with table DDD. Can MyBatis handle this kind of complexity? How would you configure the mapper xml file?
Read documentation and searched for answers from others.