[sqlalchemy] Re: PickleType with custom pickler

2006-12-08 Thread dmiller
On Dec 8, 2006, at 1:30 PM, Michael Bayer wrote: the reason that get_history calls attribute_manager.get_history is because all awareness of attribute history is handled by the attribute module. the reason attribute_manager then calls the InstrumentedAttribute off of the class is because

[sqlalchemy] A better CascadeOptions impl

2006-11-15 Thread dmiller
Here's a better CascadeOptions implementation: from sets import Set class CascadeOptions(Set): keeps track of the options sent to relation().cascade def __init__(self, arg=): values = util.Set([c.strip() for c in arg.split(',')]) if delete-orphan in values:

[sqlalchemy] Re: Constructing where-clauses dynamically

2006-11-06 Thread dmiller
On Nov 6, 2006, at 3:31 PM, Randall Smith wrote: dmiller wrote: Is there a reason why this doesn't work: ... order = session.query(Order).get(1) # assume order exists itemsNotInOrder = session.query(Item).select(Item.c.order != order) # ERROR! This should work. itemsNotInOrder