[sqlalchemy] association proxy error: stale association proxy

2008-04-29 Thread Paul K
The following code duplicates a situation I'm seeing with the association proxy. There are at least two ways I can avoid having the error happen. But since I wasn't sure if the error is a usage error, I wanted to post here first before implementing my work around. One work around for the test

[sqlalchemy] Re: association proxy error: stale association proxy

2008-04-29 Thread Paul K
I understand why I'm seeing the error. But should the user really be required to keep the parent around in a variable? I would have thought that the session would be tracking each successive changes. --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: association proxy error: stale association proxy

2008-04-29 Thread Paul K
Thanks. That fixed what I was seeing. Paul Kippes On Apr 29, 1:49 pm, jason kirtland [EMAIL PROTECTED] wrote: Paul K wrote: The following code duplicates a situation I'm seeing with the association proxy. There are at least two ways I can avoid having the error happen. But since I

[sqlalchemy] Re: Detecting an update/insert/delete in the current session

2007-02-08 Thread Paul K
PROTECTED] wrote: check session.dirty before calling flush()? On 2/7/07, Paul K [EMAIL PROTECTED] wrote: Is there a way I can tell that SQLAlchemy has flushed data to the database sometime within the current session and therefore causing a potential change to the database? I have

[sqlalchemy] Re: func.max()

2006-12-07 Thread Paul K
I have wondered this myself several times. I've tried to build an SA query for a few of my database views but have always fallen back to just a straight SQL query. Is the SA method used to be database agnostic? I think that an area on the wiki set up for these sorts of examples would be

[sqlalchemy] SQL join problem

2006-11-06 Thread Paul K
I'm having difficulty with table joins not using my foreign keys. A corrected query would produce modules.module_id = module_extra_keys.module_id in the WHERE clause. But in the below test code, it does not. However, if I use the get_by() function of the data_mapper the SQL is correct.