alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

DAL query problem to perform where cause. #170

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From billyara...@gmail.com on January 31, 2011 10:21:06

What steps will reproduce the problem? db.define_table('item', Field('of_section'))

db.define_table('read',
                Field('of_item'),
                Field('of_section'))

qry = ((db.item.id == db.read.of_item) & (db.read.of_section != db.item.of_section))

print qry

db(qry).select() What is the expected output? What do you see instead? expected SQL statement:

SELECT * FROM item JOIN read on read.of_item=item.id WHERE item.of_section <> read.of_section

qry translates to: (item.id = read.of_item) AND (read.of_section IS NOT NULL)

qry expected: (item.id = read.of_item) AND (read.of_section <> item.of_section) What version of the product are you using? On what operating system? Web2py Version 1.91.1 (2010-12-22 01:37:12) Please provide any additional information below.

Original issue: http://code.google.com/p/web2py/issues/detail?id=172

alfonsodg commented 10 years ago

From massimo....@gmail.com on January 31, 2011 18:16:14

I think it si now fixed in trunk. Please check it.

Status: Fixed

alfonsodg commented 10 years ago

From billyara...@gmail.com on February 01, 2011 01:53:52

It is working now. Thank you very much!

alfonsodg commented 10 years ago

From billyara...@gmail.com on February 16, 2011 06:57:37

Although it is working in source code distribution, this bug seems to still be present in the web2py.exe version.