[web2py] Re: can I turn off the auto back-references?

2011-08-16 Thread Massimo Di Pierro
Look into dal.py this is added in: if not referee_table in colset: colset[referee_table] = Set(db, s == id) For now you can just comment these two lines. we could add a switch. One time I thought about if not

[web2py] Re: can I turn off the auto back-references?

2011-08-16 Thread Carlos
Hi Massimo, What about having a new 'referee_prefix' var in DAL, which defaults to empty string, and replacing: colset[referee_table] = Set(db, s == id) with: colset[*referee_prefix+*referee_table] = Set(db, s == id) And then just have a way to override this 'referee_prefix' value as

[web2py] Re: can I turn off the auto back-references?

2011-08-16 Thread Carlos
Hi Massimo, It seems to be working great - thanks!, Carlos

[web2py] Re: can I turn off the auto back-references?

2011-08-15 Thread Carlos
Hi Massimo, Can you please let me know if this switch can be implemented in web2py?. Many thanks, Carlos

[web2py] Re: can I turn off the auto back-references?

2011-08-15 Thread pbreit
I think you can also do: myrow.fieldname or othervalue

[web2py] Re: can I turn off the auto back-references?

2011-08-15 Thread Carlos
Hi pbreit, Thanks for your input, but that will not work, since row.fieldname still incorrectly returns the Set object (therefore not executing the 'or' statement). Secondly, fieldname is a str variable in my case, which can't be used directly with the dot notation. I just need to not have