>
>
>
> Perhaps this would be more SQL idiomatic:
>
> FROM permission p
> LEFT JOIN ON KEY role IN p AS r
> LEFT JOIN team_role AS tr ON KEY role TO r
> LEFT JOIN ON KEY team IN tr AS t
> LEFT JOIN user_role AS ur ON KEY role TO r
> LEFT JOIN ON KEY user IN ur AS u
>
>
My second guess would be:
FROM permission p
LEFT JOIN role AS r ON [FOREIGN] KEY [(p.col1 [, p.col2 ...])]
where the key spec is only required when there are multiple foreign keys in
permission pointing to role.
But my first guess would be that the standards group won't get around to it.