On Wed, Jan 28, 2009 at 02:04:38PM -0800, John Brennan wrote:
> Unfor. due to the nature of the project I cannot simply upgrade SA and
> Pylons (as much as I'd like to).

I've upgraded a project through SQLObject -> SA 0.3 -> 0.4 -> 0.5.
The upgrade from 0.3 to 0.4 took me a non-trivial amount of time.
Upgrading to 0.5 from 0.4 took me less than 10 minutes.  The only
change I had to make:

- c.logs = query[first:last].all()
+ c.logs = query[first:last]

which I had around in a few places.

Upgrading to Pylons 0.9.7 has been more of a chore that I've put off a
bit...


> This required a SIG amount of time
> because I had to add ...filter_by(purge_fl==True)... to every location
> where I'm doing a meta.Session.query(Book).filter...  let's just say
> it was pretty painful!!
[snip]
> Anyone else have ideas?

SA's mappers can map to any Selectable.  So if you can build a select
that excludes things with purge_fl=True, you're done.

http://www.sqlalchemy.org/docs/05/mappers.html#mapping-a-class-against-arbitrary-selects

-- 
Ross Vandegrift
[email protected]

"If the fight gets hot, the songs get hotter.  If the going gets tough,
the songs get tougher."
        --Woody Guthrie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to