Hi Goose
Thanks for your reply... I believe you can actually do a groupby against an already fetched (in-memory) collection using the AggregateSetPredicate predicate - however this is not what i am trying to do.
I would like to fetch an entity collection, and apply a groupby clause. My problem is that there seems to be no overload of the DataAccessAdapter "[b]FetchEntityCollection[/b]" method that accepts a groupBy clause. I am trying to get the the bottom of if there is a way to do this that i don't know about OR find out if there is a good reason why there is not.
Maybe some real world examples will help illustrate what i am trying to do
Example 1
Table/Entity
pk_fk_productID (int)
pk_fk_relatedProductID (int)
Task
To retrieve a collection of unique relatedProductIDs where productID is in (1, 2, 3 ,4, 5)
Comments
I think this would be a fairly straight forward collection fetch if you could groupby pk_fk_relatedProductID. Without a groupby you can get duplicate related productIDs as the select is against several productIDs
Example 2
View/Entity
ProductsInCategory (a product can be in multiple categories, so this view can have duplicate products in)
Task
Fetch a collection based on certain given user search parameters, but don't return duplicate products
Comments
Again I think this would be a fairly straight forward collection fetch if you could groupby all the product fields. Without it, you any products that are in more than one category will be returned in duplicate.
There are alternatives that can be use (such as Projection), but this seems a complex solution, when a groupby clause on an entity collection would seem to be a simple alternative.
Any input appreciated.