Announcement Announcement Module
Collapse
No announcement yet.
How to test lazy loading for ibatis? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to test lazy loading for ibatis?

    Hi,

    I am extending SqlMapClientDaoSupport to implement my
    DAO class.

    Now how do I write unit test to convince myself that
    the lazy loading feature of iBatis is working?

    E.g. A Category object has a complex collection of Item objects so the code below won't load the collection by
    default (correct me if I am wrong)

    Category cat = categoryDao.getCategory( new Long(1) );

    I assume collection will be loaded if I try to access
    collection like

    List items = cat.getItems();

    Right?

    Thanks,
Working...
X