I have a RESTful project that is build by Spring MVC framework, with Mybatis ORM.
There are two tables, Book and Author, with one-many relationship.

I enable Lazy Load, so that when I query Book, it won't query Author unless I call book.getAuthor() method, and everything works well.
mybatis-config.xml: enable Lazy Load

However, when RESTful controller return Book object, it use Jackson to transfer Book object to json, and it trigger mybatis to load Author object..
Controller: in line 30, it only query Book.

After line 31, it also query Author

Is there a way to prevent mybatis trigger lazy load when RESTful controller return json?






