NHibernate correlated subquery fetching single item
问题 I'm using NHibernate 3.2 and have the following model: class User { public virtual int Id { get; set; } public virtual string Username { get; set; } public virtual IList<Log> Logs { get; set; } } class Log { public virtual int Id { get; set; } public virtual User User { get; set; } public virtual DateTime Date { get; set; } } Now, I want to query User with the date of ther latest Log-entry. class UserDto { public int UserId { get; set; } public string Username { get; set; } public DateTime?