1. Over ride Batch Size for Lazy Fetching forum.hibernate.orgWithin my mapping file I have set the associations of my object to be fetched lazily, with a batch size of 10. As part of our application it is possible to specifiy different page sizes at runtime. I am wanting to retrieve a list of all the accounts, so that the total pages may be determined but only wish to initialise ... |
2. Does Batch-Fetching work with lazy=false? forum.hibernate.orgIf HQL is used, the fetch="join" from the mapping will be ignored only get/load and criteria respect the mapping HQL would have to be like "from Product p left join fetch p.parts" but then you would have to cast the result-List to a set to eliminate double results so one query for products and one for subselect of parts is easier ... |