On Jul 9, 2:25 am, mdipierro <[email protected]> wrote: > Do not worry, we are not changing to an ORM. Right now you can do > this: > > db.define_table('person',Field('birthdate','date')) > db.person.age = lambda row: (request.now-request.birthdate).years > > for person in db().select(db.person.ALL): > print person.name,'is',db.person.age(person),'years old' > > perhaps we can introduce the syntax (pros/cons?) > > for person in db().select(db.person.ALL): > print person.name,'is',person.age,'years old'
that would be great! Would we be able to select on db.person.age? eg: db(db.person.age >= 18).select() Richard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

