i'm using nhibernate 2.0.1
i have this entity
Result
{
long Id; //PK
long SourceId; //FK
DateTime Time;
}
i need to get for each Source the last Result (the returned set that i
want it's samething as
Dictionary<long, Result> ie the map SourceId -> last result
but it's ok also to get only the list of all the last results
i want to use a hql query as
select r from Result r
join (select r2.SourceId, max(r2.Time) maxDate from Result r2
group by r2.SourceId) r1
on r.Time=r1.maxDate and r.SourceID=r1.SourceID
but this doens't work (the error is "in expected: select")
has samebody a suggestion?
--
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.