consider the following code
public IList<TimeZoneDisplayNameDTO> GetDisplayNames()
{
var c = Session.CreateCriteria<TimeZone>()
.Add(Restrictions.IsNotNull("DisplayName"))
.SetProjection(
Projections.Distinct(
Projections.ProjectionList()
.Add(Projections.Property("DisplayName"))
.Add(Projections.Property("StandardName"))
.Add(Projections.Property("GMTOffset"))
)
)
.SetResultTransformer( new AliasToBeanResultTransformer
(typeof(TimeZoneDisplayNameDTO)))
//.SetCacheable(true)
//.SetCacheRegion("geo.timezone")
.AddOrder(Order.Asc("GMTOffset"));
return c.List<TimeZoneDisplayNameDTO>();
}
If i uncomment the commented lines, i get a cast exception (cannot
cast namespace.TimeZoneDisplayNameDTO to system,object[])
i vaguely remember running into this about a year ago, but assume it
was fixed. Any clues ?
--
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.