2009/6/23 Craig van Nieuwkerk <[email protected]>

>
> And I am trying to query it using the Criteria API like this.
>
> ICriteria query = m_CustomerRepository.Query()
>    .CreateAlias("Address", "a",
> NHibernate.SqlCommand.JoinType.LeftOuterJoin);
> var result = query
>  .SetProjection(Projections.Distinct(
>    Projections.ProjectionList()
>      .Add(Projections.Alias(Projections.Property("CustomerId"),
> "CustomerId"))
>      .Add(Projections.Alias(Projections.Property("Name"), "Name"))
>      .Add(Projections.Alias(Projections.Property("Addresses"),
> "Addresses"))
>    ))
>  .SetResultTransformer(new AliasToBeanResultTransformer(typeof(Customer)))
>  .List<Customer>() as List<Customer>;
>

Only a curiosity.
This is the whole query ?
No "if" ? nothing to change between a call and other ?

-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to