CROSS JOIN get included when there is only one tablecolumn asked
db(db.auth_user.id ==
db.auth_membership.user_id).select(db.auth_user.username,
db.auth_membership.group_id)
Out[1]: <Rows (834)>
In [2]: db(db.auth_user.id ==
db.auth_membership.user_id)._select(db.auth_user.username,
db.auth_membership.group_id)
Out[2]: 'SELECT "auth_user"."username", "auth_membership"."group_id" FROM
"auth_user", "auth_membership" WHERE ("auth_user"."id" =
"auth_membership"."user_id");'
In [3]: db()._select(db.auth_user.username, db.auth_membership.group_id,
join=db.auth_membership.on(db.auth_user.id == db.auth_membership.user_id))
Out[3]: 'SELECT "auth_user"."username", "auth_membership"."group_id" FROM
"auth_user" JOIN "auth_membership" ON ("auth_user"."id" =
"auth_membership"."user_id");'
In [4]: db()._select(db.auth_membership.group_id,
join=db.auth_membership.on(db.auth_user.id == db.auth_membership.user_id))
Out[4]: 'SELECT "auth_membership"."group_id" FROM "auth_user" CROSS JOIN
"auth_membership" JOIN "auth_membership" ON ("auth_user"."id" =
"auth_membership"."user_id");'
On Tue, Feb 27, 2018 at 11:13 AM, Richard Vézina <
[email protected]> wrote:
> Found that which seems related :
> https://groups.google.com/d/msg/web2py/qYgMQ3rhf5E/U6TIDKUlBgAJ
>
> And the initial post refered by villas : https://groups.google.com/d/
> msg/web2py/KpxWh4ikqG8/cDBbhiK_3F8J
>
> There is not seems to have any issue being open for this over pyDAL
> repository
>
> Richard
>
> On Tue, Feb 27, 2018 at 10:55 AM, Richard Vézina <
> [email protected]> wrote:
>
>> I review my code and found what happen...
>>
>> Somehow this query :
>>
>> db()._select(db.table_name.other_table_id, join=db.table_name.on(db.table
>> _name.other_table_id == db.other_table_name.id))
>>
>> Return (2.14.6) :
>>
>> SELECT table_name.other_table_id FROM other_table_name JOIN table_name
>> ON (table_name.other_table_id = other_table_name.id);
>>
>> Now it return (trunk-master and I guess 2.16.1) :
>>
>> SELECT "table_name"."other_table_id" FROM "other_table_name" CROSS JOIN "
>> table_name" JOIN "table_name" ON ("table_name"."other_table_id" = "
>> other_table_name"."id");
>>
>>
>> I think there is a bug somewhere (pyDAL??), removing the CROSS JOIN
>> table_name in red above resolve the issue...
>>
>>
>>
>> On Tue, Feb 27, 2018 at 10:22 AM, Richard Vézina <
>> [email protected]> wrote:
>>
>>> git clone --recursive https://github.com/web2py/web2py.git
>>>
>>> On Tue, Feb 27, 2018 at 10:20 AM, Richard Vézina <
>>> [email protected]> wrote:
>>>
>>>> git clone --recursive web2py repo http address
>>>>
>>>> On Tue, Feb 27, 2018 at 1:29 AM, pbreit <[email protected]> wrote:
>>>>
>>>>> Could someone please confirm for me if I can just do a "git pull" or
>>>>> do I need to do something else to make sure I also get latest DAL?
>>>>>
>>>>> --
>>>>> 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.