This content has been marked as final.
Show 1 reply
-
1. Re: Expensive lazy load case
sdplox Jun 5, 2008 12:11 AM (in response to sdplox)day along, we found a good option.
is not tested yet, but we think that change this code lines:
merchants = em.createQuery("select m from Merchant m where lower(m.merchantGeneralCompanyName) like :merchSearchPattern or lower(m.merchantComertialCompanyName) like :merchSearchPattern") ).setParameter("merchSearchPattern", getSearchPattern()) .setMaxResults(pageSize) .setFirstResult( page * pageSize ) .getResultList();
for something more specific in the first line can works, something like:
merchants = em.createQuery("select m.generalCompanyName from Merchant m where lower
for example.
what do you think?