[web2py] Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-01 Thread 'Awe' via web2py-users
Hello, I post a simple step by step example, to explain. Doing a left join and using a where clause like: table.field==None Depending on _enable_record_versioning is enabled or not, I get different results when executing the identical query. The result when versioning is DISABLED is the correct on

[web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-02 Thread 'Awe' via web2py-users
So, I did check it again: It seems that DAL is not able to handle a left join using ISNULL condition in combination with enabled record versioning. There are two "is active" checks within the left join: OK The next two upcoming ANDs to check "is_active" are not necessary and actually prohibit th

Re: [web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-04 Thread 'Awe' via web2py-users
Field('quantity', 'integer'), > Field('is_active', 'boolean', > writable=False, readable=False, default=True, > required=True, requires=IS_NOT_EMPTY())) > > > > That way you don't need to care ab

Re: [web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-05 Thread 'Awe' via web2py-users
ord versioning : > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Record-versioning > > Richard > > On Sun, Mar 4, 2018 at 12:53 PM, 'Awe' via web2py-users < > web...@googlegroups.com > wrote: > >> Hello Richard, many thanks fo

Re: [web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-07 Thread &#x27;Awe&#x27; via web2py-users
thought you provide that in the first > email... Let me have a look at that... > > Richard > > > > On Mon, Mar 5, 2018 at 2:02 PM, 'Awe' via web2py-users < > web...@googlegroups.com > wrote: > >> Hello Richard, >> it is not a problem of de

Re: [web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-07 Thread &#x27;Awe&#x27; via web2py-users
ive' > ) > > if db(db.test.id > 0).count() == 0: > db.test.insert(title='Peter', granny=None, type_marker='person') > db.test.insert(title='Paul', granny=None, type_marker='person') >

Re: [web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-07 Thread &#x27;Awe&#x27; via web2py-users
. > > But I guess I miss something with related to what you try to achieve with > this aliasing thing that you do... > > Also the use case is not obvious for me as why are you doing these > aliases... I guess to retrieve some sort of genealogy/record parent-child > relation

Re: [web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-08 Thread &#x27;Awe&#x27; via web2py-users
= (test2.type_marker=='object') | (test2.type_marker==None) >> & (test1.type_marker=='person') >>...: >> >> In [5]: db().select(db.test.ALL) >> Out[5]: >> >> I did there... >> >> Same result... >> >> T

[web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-09 Thread &#x27;Awe&#x27; via web2py-users
Hello Anthony, Richard: Here is a link to download a demo app: https://c.gmx.net/@316857413586131071/y6xMeU53Ql2MtJz-wr0-CQ Just install it, on the main page click the link. I just did the input written in the very first post. Additionally I attached a screenshot showing my result. Many thanks t

[web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-12 Thread &#x27;Awe&#x27; via web2py-users
Hello Leonel, thanks for analyzing. Will open issue today. Andreas Am Freitag, 9. März 2018 16:55:12 UTC+1 schrieb Leonel Câmara: > > This is definitely a bug, the solution doesn't seem easy, The problem is > that it should not apply the common filters on the alias used on the left > join again

[web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-03-19 Thread &#x27;Awe&#x27; via web2py-users
OK, issue filed on: 2018-03-14 Andreas Am Montag, 12. März 2018 09:14:22 UTC+1 schrieb Awe: > > Hello Leonel, > thanks for analyzing. Will open issue today. > Andreas > > Am Freitag, 9. März 2018 16:55:12 UTC+1 schrieb Leonel Câmara: >> >> This is definitely a bug, the solution doesn't seem easy,

[web2py] Re: Unexpected behaviour executing a query with DAL and record versioning enabled

2018-05-11 Thread &#x27;Awe&#x27; via web2py-users
Hello Leonel, opened this Issue on Mar 14, still no one assigned? Regards, Andreas Am Freitag, 9. März 2018 16:55:12 UTC+1 schrieb Leonel Câmara: > > This is definitely a bug, the solution doesn't seem easy, The problem is > that it should not apply the common filters on the alias used on the lef

[web2py] Re: web2py 2.17.1

2018-10-01 Thread &#x27;Awe&#x27; via web2py-users
Well, yes I think it breaks something, in 2.16.1 this was fine: form = SQLFORM.factory( Field('always_show', default='123', readable=True, writable=False), Field('writable_if_intended', default='456', readable=True, writable=True), readonly=False, ) Both fields were shown, first fi

[web2py] SQLFORM.factory in 2.17.1

2018-10-04 Thread &#x27;Awe&#x27; via web2py-users
in 2.16.1 this was fine: form = SQLFORM.factory( Field('always_show', default='123', readable=True, writable=False), Field('writable_if_intended', default='456', readable=True, writable=True), readonly=False, ) Both fields were shown, first field as textonly, and second one as edi

[web2py] sqlhtml changes for sqlform.factory, not nice, 2.15.4 versus 2.18.5

2021-08-04 Thread &#x27;Awe&#x27; via web2py-users
we are using sqlform.factory a lot, but the way fields are shown/behave was changed from 2.15.4 fields = [f.name for f in table if (ignore_rw or f.writable or f.readable) and (readonly or not f.compute)] to 2.18.5 fields = [f.name for f in table if (ignore_rw or f.writable or (f.readable and f.

[web2py] Re: sqlhtml changes for sqlform.factory, not nice, 2.15.4 versus 2.18.5

2021-09-30 Thread &#x27;Awe&#x27; via web2py-users
Is anybody out there facing the same problem, wondering about getting no answers... Awe schrieb am Mittwoch, 4. August 2021 um 18:16:40 UTC+2: > we are using sqlform.factory a lot, but the way fields are shown/behave > was changed from > 2.15.4 > fields = [f.name for f in table if (ignore_rw o

[web2py] Re: sqlhtml changes for sqlform.factory, not nice, 2.15.4 versus 2.18.5

2021-10-09 Thread &#x27;Awe&#x27; via web2py-users
Thanks for the answer I haven't tried the latest version and I hope this behavior doesn't change from version to version.. but. I thought / hoped a web2py developer could explain why this important/central feature was changed and how to deal with it best. Jim S schrieb am Samstag, 2. Oktober 202

[web2py] Re: sqlhtml changes for sqlform.factory, not nice, 2.15.4 versus 2.18.5

2021-10-11 Thread &#x27;Awe&#x27; via web2py-users
Hello Massimo, thanks for replying. Maybe I didn't quite understand. I assumed that when using the Sqlform.factory no "record" is transmitted. This means that the "create" branch is always used in 2.21, 2.18, 2.15.4, independent of "create" or "edit" forms. In my point of view, for sqlform.facto