Forums / Developer / Grouping by an attribute

Grouping by an attribute

Author Message

Pablo C. Vergara Castro

Friday 13 August 2004 1:43:39 am

Hi to all.

I would like to know the way to make fetch that single gives back objects to me grouped by a certain attribute. For example, I have several objects of a class publication that have an attribute dates, and what I want it is to know the way to extract the dates that are different and in addition to solely be able to count them.

{... 1999 ...},{... 2000 ...},{... 1999 ...},{... 2001 ...},{... 2000 ...} ===> {1999},{2000},{2001}, (3 attributes)