perhaps it is wrong... I can see the classes in this thread.

On Mon, Oct 11, 2010 at 8:11 PM, Fabio Maulo <[email protected]> wrote:

> select p from User u left join u.GroupSet gs left join gs.PermissionSet ps
> left join ps.Permission p where u.id = 123
>
>
> On Mon, Oct 11, 2010 at 6:44 PM, Smokefoot 
> <[email protected]>wrote:
>
>> Its easy... 3 left joins and everything is fine!I hope i havnt done
>> any error in the few secunds i wrote the sql-query :D
>>
>> SELECT Permission.*
>> FROM User
>> LEFT JOIN GroupSet ON GroupSet.UserId=User.Id
>> LEFT JOIN PermissionSet ON PermissionSet.GroupId=GroupSet.GroupId
>> LEFT JOIN Permission ON Permission.Id=PermissionSet.PermissionId
>> WHERE User.Id=123;
>>
>> --
>> 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.
>>
>>
>
>
> --
> Fabio Maulo
>
>


-- 
Fabio Maulo

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