On Mon, Jan 11, 2010 at 09:59, Peter Dotchev <[email protected]> wrote:
> Now, I want to get a list of products including the lowest price for each
> product.
> I don't see MIN/MAX mentioned in JCR 2.0 spec, so it seems they are not
> support by repository queries. :(
>
> What approach would you recommend to fetch such a list from the repository.

You can query all products and order by price, eg. in xpath something like this:

//*...@product='myproduct'] order by @price

with ascending or descending at the end, depending on the order. Only
reading the first element from the result should be enough ;-)

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to