Off the top of my head:

  from Message m, User u
  where u = :user
  and m.User in elements(u.Friends)

The only parameter is the original user.

    Diego


On Tue, Nov 23, 2010 at 13:29, dedgi <[email protected]> wrote:

> I am trying to do something that is giving me fits.
>
>  I have a User class. Each User has a self refenceing map of "Friends"
> which is just a List<User>.
>
>  I have a Message class that has a one-to-one relation with a User. I
> want to be able to select any messages created by a user's friends.
> From what I understand Linq2NH will not work for this particular case.
> The only way I have been able to do it is using an "IN" query and
> passing in a list of IDs for the users in the list although this has
> limitations once the number of friends gets quite large. I think the
> limit that MSSQL 2005 can handle is around 200.
>
> Is there another way I can accomplish this? Can I somehow create a
> table variable in HQL?
>
> Thanks in advance.
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

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