Re: [SQLObject] Re: sqlobject for a view

2006-02-08 Thread Stuart Bishop
Johan Dahlin wrote: > Oleg Broytmann wrote: > >> On Thu, Jan 05, 2006 at 04:01:17PM -0600, Tim Edwards wrote: >> >>> So I created a view of it in Postgres. But now I can't seem to create >>> an object wrapper for it. SqlObject complains that the view doesn't >>> have a primary key. I saw a thre

Re: [SQLObject] unicode string in queries - a bug?

2006-02-08 Thread Stuart Bishop
Oleg Broytmann wrote: > On Mon, Jan 30, 2006 at 11:40:55AM +0700, Stuart Bishop wrote: > >>Oleg Broytmann wrote: >> >>> Do cls.selectBy(that_unicode_col=u'some string'.encode(dbEncoding)) >> >>We handle this quite simply by encoding the entire query before sending it >>to the database > >H

[SQLObject] Re: subclass to subset data

2006-02-08 Thread Randall Smith
Oleg Broytmann wrote: You may try to override .select() and .selectBy() and further filter them. Like this: class Subset(ParentSet): class meta: table = "parent_set" def select(self, **kw): sresult = super(Subset, self).select(**kw) return sresult.filter(Subset.q.name

Re: [SQLObject] Transaction and cache in r1581

2006-02-08 Thread Luke Opperman
Quoting Justin Azoff <[EMAIL PROTECTED]>: The problem I was seeing was similar to this, but not the same. The stale values were not coming from sqlobject caching at all, but from the MVCC in postgresql... Using transactions for all reads will get around this problem, but the root cause is th

Re: [SQLObject] Transaction and cache in r1581

2006-02-08 Thread Justin Azoff
Luke Opperman wrote: Quoting John Speno <[EMAIL PROTECTED]>: As all of our sqlobjects have 'cacheValues = False' set. Obviously, this didn't help the transaction problem before the fix, bu should the fix introduced in r1581 to cache.py fix our inconsistency problems? The fix in r1581 was ori

Re: [SQLObject] Transaction and cache in r1581

2006-02-08 Thread Luke Opperman
Quoting John Speno <[EMAIL PROTECTED]>: As all of our sqlobjects have 'cacheValues = False' set. Obviously, this didn't help the transaction problem before the fix, bu should the fix introduced in r1581 to cache.py fix our inconsistency problems? The fix in r1581 was originally written in ord

[SQLObject] Transaction and cache in r1581

2006-02-08 Thread John Speno
In our Subway app, we were seeing the problem of cache inconsistency between things done in transactions and things not done in transactions. I see a fix for this was just put in a few days ago, so I've updated sqlobject and we're testing it now. My quesiton is this: As all of our sqlobj

Re: [SQLObject] Transaction and cache in r1581

2006-02-08 Thread Oleg Broytmann
On Wed, Feb 08, 2006 at 11:15:43AM -0500, John Speno wrote: > In our Subway app, we were seeing the problem of cache inconsistency > between things done in transactions and things not done in transactions. It would be helpful if you can write a short program that demonstrates the problem. I c