Could you post your models...

You can make view at DB level and define a web2py model of your view... It
help to get things done sometime and you can come back later and build
web2py query correctly.

Richard

On Mon, Jul 25, 2011 at 1:45 PM, Cliff <[email protected]> wrote:

> Found it, but don't know what to do about it.
>
> Here is what the DAL is spitting out:
>
> SELECT  auth_user.first_name, training_requirements.course_id FROM
> auth_user LEFT JOIN training_requirements ON
> (training_requirements.user_id = auth_user.id) WHERE
> (((training_requirements.course_id = 8) OR
> (training_requirements.course_id IS NULL)) AND
> (training_requirements.request_tenant = '1'));
>
> The tail end of the query should be like this:
> AND((training_requirements.request_tenant = '1') |
> (training_requirements.request_tenant IS NULL))
>
> What I really want to do is check the auth_user entries against the
> request tenant.  Training_requirements is just a link table and I
> don't really see a need to protect those records since the objects on
> both ends of the link get protection.
>
> I really don't want to start writing native SQL to work around this.

Reply via email to