Delayed loading and L2 caching in mybatis
I. Lazy Loading 1. Core Definition Lazy loading is MyBatis’s optimization mechanism for related queries : when querying the main object, its related objects (such as the one-to-many relationship between users and accounts) are not queried immediately. The SQL execution of the related query is only triggered when the related object is actually used (getter method is called). 2. Core … Read more