Hi, I'm having a domain object say "Product" and "Order". Each Order contains Products so, "product" domain object is property in "Order" domain object. Inorder to retrieve both order and its product in one call, I have enable Lazy-Loading = "True" and cascade enabled on mapping file.Because of this every time, I retrieve Order object,so its products get pulled up from database. My question is, is there any possiblity to load "Product"'s in Order domain object on demand basis. I.e when we i want to retrieve all orders, i dont want to populate "products" with respective order. In some cases we want to populate all orders with their repective "products". In their any possibility to populate on "need basis". Please let me know ASAP
|