> 
> I'm using DBIx::Record set to great effect, but I've 
> discovered a bug which annoys me. An SQL statement with joins 
> in it doesn't need to name any tables, but if I leave out the 
> !Tables parameter it produces a statement like 'SELECT * 
> FROM', which the server rightly rejects with an error. I'd 
> like it to look for a !TabJoin (or other parameters that make 
> it use a join) and not generate an invalid statement when 
> they're present but !Tables is not. As it is, it doesn't 
> matter what I put in !Tables beccause it's not used.
> 

DBIx::Recordset needs both the !Table and the !TabJoin parameter. Also it
might work in some cases with the wrong name in !Table, it will mostly not
work. The reason why both are needed is that otherwise DBIx::Recordset would
need to parse the !TabJoin parameter to get the names  of all involved
tables.

I hope this helps

Gerald



> Here's an example of one place this occurs:
> 
>   *set = DBIx::Recordset->Search({'!DataSource'      => 
> $self->mydatabase,
>                                   '!Table'           => 'spurious',
>                                   '!TabJoin'         => 
> '((users JOIN membership ON users.id = membership.users_id) 
> JOIN groups ON membership.groups_id = groups.id) JOIN 
> permissions ON (users.id = permissions.users_id AND user_r) 
> OR (groups.id = permissions.groups_id AND group_r) OR 
> member_r OR anonymous_r',
>                                   '!Fields'          => 'true',
>                                   'users.id'         => $userid,
>                                   'permissions.page' => $pn});
> 
> 
> Is this feasable?
> 
> db48x
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to