Mybatis nested one-to-one or one-to-many relations mapping
问题 I use myBatis to map a simple database (as an example). It consists of 4 models: User , Car , Tariff , Insurance . User has private List carList and private Tariff tariff and some other fields with getters and setters. Car has private Insurance insurance and some other fields with getters and setters. So I can map only 1st nesting level. I mean i can map User and its fields - Tariff and a List of Cars . But I can't map Insurance field of Car . What should I do? Here is my mapper.xml: <?xml