In 17.01

line 627

if join and not left:
            cross_joins = iexcluded + list(itables_to_merge)

cross_joins contains both tables involve in the query, which wasn't the
case in 16.11

I follow up and it could come from

helpers.methods.merge_tablempas() (introduced in 17.01) use
in _build_joins_for_select() or it could be caused by this piece of code
included in the former mention function :

        tablemap = {}
        for item in param:
            if isinstance(item, Expression):
                item = item.first
            key = item._tablename
            if tablemap.get(key, item) is not item:
                raise ValueError('Name conflict in table list: %s' % key)
            tablemap[key] = item

At that point code get difficult to understand what it does...

Should we consider this a flaw in the actual code or  is this issue which
goes away when not doing empty query is related to the difficulty we were
having supporting the empty query syntax???

I guess the answer to this question will resolve this definitely...

Richard

On Tue, Feb 27, 2018 at 2:11 PM, Richard Vézina <[email protected]
> wrote:

> What causing the CROSS JOIN issue had been introduce between pyDAL 16.11
> and 17.01
>
> There is a compare of the 2 : https://github.com/web2py/
> pydal/compare/v16.11...v17.01
>
> Richard
>
> On Tue, Feb 27, 2018 at 12:59 PM, Richard Vézina <
> [email protected]> wrote:
>
>> At least there is a open issue on the book repo :
>> https://github.com/web2py/web2py-book/issues/346
>>
>> On Tue, Feb 27, 2018 at 12:57 PM, Richard Vézina <
>> [email protected]> wrote:
>>
>>> Here : https://github.com/web2py/pydal/issues/388
>>>
>>> I think the follow up update to the book and change log never occurs...
>>>
>>> I am fine with patching my code and make sure I don't leave empty
>>> query... But I am curious to know if this "CROSS JOIN table_name" addition
>>> could be avoid otherwise than providing non empty query... I mean it rough
>>> mistake...
>>>
>>> Richard
>>>
>>> On Tue, Feb 27, 2018 at 12:39 PM, Richard Vézina <
>>> [email protected]> wrote:
>>>
>>>> @Leonel, I recall about empty query beeing deprecated... But I can't
>>>> find any reference to it neither in change log of pyDAL nor web2py change
>>>> log... Niether the book...
>>>>
>>>> Which version of the DAL the support been dropped?
>>>>
>>>> Richard
>>>>
>>>>
>>>>
>>>> On Tue, Feb 27, 2018 at 12:01 PM, Richard Vézina <
>>>> [email protected]> wrote:
>>>>
>>>>> In [6]: db(db.auth_user.id > 0)._select(db.auth_membership.group_id,
>>>>> join=db.auth_membership.on(db.auth_user.id ==
>>>>> db.auth_membership.user_id))
>>>>> Out[6]: 'SELECT "auth_membership"."group_id" FROM "auth_user" JOIN
>>>>> "auth_membership" ON ("auth_user"."id" = "auth_membership"."user_id") 
>>>>> WHERE
>>>>> ("auth_user"."id" > 0);'
>>>>>
>>>>> Seems to solve it...
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Feb 27, 2018 at 11:58 AM, Leonel Câmara <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> I believe we deprecated empty queries as they caused way too many
>>>>>> problems and bugs (e.g. common filters don't work).
>>>>>>
>>>>>> --
>>>>>> Resources:
>>>>>> - http://web2py.com
>>>>>> - http://web2py.com/book (Documentation)
>>>>>> - http://github.com/web2py/web2py (Source code)
>>>>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "web2py-users" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to