Model:

class Message
{
  User Author { get; set; }
  string Text { get; set; }
}

class MessageReading
{
  User ReadBy { get; set; }
  Message Message { get; set; }
  public bool IsRead { get; set; }
}

The MessageReading table has only ReadBy and Message columns.
Existence of a record means the message was read by specific user.
Absence of a record means the message wasn't read by the given user.

Given a user, for each message object in the db I'd like to get a
MessageReading object with the IsRead property correctly set.

How do I perform this query with NH?

If the question seems unclear, please ask :)

--

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=.


Reply via email to