Re: [web2py] Re: [Version 1.96.4] DAL timing issue.

2012-07-10 Thread Santiago Gilabert
Because the same query, using raw sql is resolved in seconds. The reason I do reg = db.voting_center(id) is because I need the voting_center object. If I do this: for reg in db(db.voting_center).select(): It takes a lot of time to get resolved (40 mins, maybe more ...). On Tue, Jul 10, 2012 at

Re: [web2py] Re: [Version 1.96.4] DAL timing issue.

2012-07-10 Thread Santiago Gilabert
Hello, Limiting the number of rows or removing the virtual field, it works. So, as far as I understand, this is an issue related to the virtual field defined for voting_center. It also works if I use db.executesql to get the id's and then db.voting_center(id) to load the voting_center record. I u

Re: [web2py] Re: [Version 1.96.4] DAL timing issue.

2012-07-05 Thread Santiago Gilabert
db.executesql(db(db.voting_center)._select()) takes only a few seconds It has one virtual field, but it is lazy. I think it is not necessary, but I'm pasting the code below, is case you want to take a look. class VotingCenterVirtualField(object): def delete_results(self): def lazy(self=self

Re: [web2py] DAL : fill with zeroes a specific field before insert / update

2012-07-02 Thread Santiago Gilabert
Thanks all, I going to use a custom validator then. Best Regards, Santiago On Mon, Jul 2, 2012 at 3:00 PM, vinicius...@gmail.com wrote: > Remember "requires" property is not used when you just insert(), update() > or update_record(). > > So, in Web2py you don't have anything like a db trigger.

[web2py] Re: Virtual Fields. Strange behavior when saving db result sets Build in types

2011-08-14 Thread Santiago Gilabert
anyone? I found that someone else asked about the same issue 5 month ago but there are no comments about it. http://groups.google.com/group/web2py/browse_thread/thread/845e6cdef5de4e92/4ace7b81d9e239c3?lnk=gst&q=Virtual+fields&pli=1 Thanks Santiago On Sat, Aug 13, 2011 at 7:07 PM, Santiago wr