[web2py] Re: 2.2.1 left joins broken?

2012-12-22 Thread Niphlod
uhm the thing is, if you have record versioning, all active records should be marked with True. There's no point in record versioning if active records can be False or True *or None*. They can be either True or False to correctly identify the single active record on those tables. am I

[web2py] Re: 2.2.1 left joins broken?

2012-12-22 Thread Massimo Di Pierro
I think we agree with each other. The problem is that somebody may add auth.signature later and therefore precent records will have is_active=None. The user will have to manually set is_active from None to True. On Saturday, 22 December 2012 07:08:58 UTC-6, Niphlod wrote: uhm the thing

[web2py] Re: 2.2.1 left joins broken?

2012-12-22 Thread Niphlod
agreeing too. Someone applying versioning AFTER must know that he must set all current records to True (maybe a note marked important on the relevant section on the book may be appropriate). Better a one-time operation than large where conditions appearing everywhere and killing performances.

[web2py] Re: 2.2.1 left joins broken?

2012-12-22 Thread Massimo Di Pierro
I changed it so that auth.signature.is_active defaults to notnull=True. This makes sure what when added in a migration, it sets the default value for existing records. Hope this does not break existing apps. If you have an existing app using auth.signature, please check this does not break it.

[web2py] Re: 2.2.1 left joins broken?

2012-12-21 Thread Massimo Di Pierro
It looks to be the generated SQL is correct. It is possible you enabled record versioning and that added the common_filter is_active==True. Yet perhaps you have records with is_active=None and therefore they showed up before and not now. On Friday, 21 December 2012 10:50:13 UTC-6, Cliff

[web2py] Re: 2.2.1 left joins broken?

2012-12-21 Thread Cliff Kachinske
SQL is incorrect. is: AND supplier_contacts.is_active = 'T' should be AND (supplier_contacts.is_active = 'T' OR supplier_contacts.is_active IS NULL) On Friday, December 21, 2012 1:05:16 PM UTC-5, Massimo Di Pierro wrote: It looks to be the generated SQL is correct. It is possible you

[web2py] Re: 2.2.1 left joins broken?

2012-12-21 Thread Massimo Di Pierro
It is correct in the sense it is what I intended it to be. You are proposing a change of behavior. I see where you are coming from. Please open a ticket about this. I would like to have some more opinions about this. Should None in is_active be treated as True? On Friday, 21 December 2012