Thanks Skip,


Krishan Babbar
----------------------------------------------------------------------------------------------------------------------------
Disclaimer: This email and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended even if addressed incorrectly. If you received this email in error please notify the sender, do not disclose, copy, distribute or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this email is prohibited. Thank you for your compliance. -----Original Message----- From: Skip
Sent: Tuesday, May 01, 2012 9:59 PM
To: [email protected]
Subject: RE: Need to fetch records using multiple ids in where clause

Try this:

List productIds = UtilMisc.toList("product1", "product2", etc);
           List productsList  = delegator.findByCondition("Product", new
EntityExpr("productId", EntityOperator.IN, productIds), null, null);

You can also use findByAnd

Skip

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, May 01, 2012 5:20 AM
To: [email protected]
Subject: Need to fetch records using multiple ids in where clause


Hi All,

I want to fetch products' details using multiple product ids in where clause
so that there should be a single query for all the products to be shown in
single page.
Similarly I want to fetch multiple products for multiple categories like at
home page I am showing all the products of 3 different categories say mostly
sold, mostly viewed, recently sold. So my concern is fetching all the data
in one go instead of calling same query/service again and again.

Please let me know if such services already exist?


Thanks,
Krishan Babbar
----------------------------------------------------------------------------
------------------------------------------------
Disclaimer: This email and any files transmitted with it may contain
privileged or confidential information. It is solely for use by the
individual for whom it is intended even if addressed incorrectly. If you
received this email in error please notify the sender, do not disclose,
copy, distribute or take any action in reliance on the contents of this
information; and delete it from your system. Any other use of this email is
prohibited. Thank you for your compliance.


Reply via email to