[web2py] Re: update_record() for DB's without an auto_increment field

2011-11-21 Thread Dmitry Vukolov
Thank you! Good to know that it's an existing limitation rather than an overlooked bug. If that would be in the book, it will save time trying to figure out what's wrong. Dmitry

Re: [web2py] DAL's virtual fields

2011-11-21 Thread Dmitry Vukolov
That actually works! Many thanks for the suggestion. I wish that could be in the book if that's the recommended approach. Dmitry

[web2py] DAL's virtual fields

2011-11-21 Thread Dmitry Vukolov
In the Official web2py Book I read about DAL's Virtual Fields that: "...each method of the class that takes a single argument (self) is a new virtual field." It seems however that any function of the class is treated as a new field and called to calculate its value. As an example I added a supp

[web2py] update_record() for DB's without an auto_increment field

2011-11-21 Thread Dmitry Vukolov
Greetings! I seem to be having a problem using DAL with legacy databases, namely those without an existing AUTO_INCREMENT field: db.define_table('manufactured_by', Field('product', 'string'), Field('brand', 'string'), primarykey=['product', 'brand']) With a similar setup the update(