I would guess that Craig is trying to get a distinct list of Customers
where their name or their address matches a user-entered search term.
If this is the case, then you might want to try this approach which
I've seen on StackOverflow (link:
http://stackoverflow.com/questions/318157/get-distinct-result-set-from-nhibernate-using-criteria-api)
and on NHForge (link:
http://nhforge.org/wikis/howtonh/get-unique-results-from-joined-queries.aspx):
session.CreateCriteria(typeof(Customer))
.Add(...)
.SetResultTransformer(new DistinctEntityRootTransformer())
.List<Customer>();
Cheers,
John
On Jun 24, 1:18 pm, dummerchen <[email protected]> wrote:
> Afaik you can only project properties (e.g. "a.Street") and not
> entities. What exactly do you want to get ?
>
> --
> Wolfgang
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---