>
> That sounds even nicer, and since I'm just starting out with no legacy 
> code I've been meaning to try dropping 0.8 in even before it is final.  It 
> sounds like I could just do something like 
> event.listen(MyDeclarativeSubclass, "load", myStamperFunc).
>

 I popped in 0.8b2 and tried something like this:

class SubBase(object):
...
def MyLoadHandler(instance, context):
   print "hit the load handler"
MyBase = declarative_base(cls=SubBase)
event.listen(MyBase, "load", MyLoadHandler)
...
class MyDataClass(MyBase):
... do all the declarative stuff
...
anInstance=session.query(MyDataClass).first()


It doesn't complain about a non-existent event when I install the handler, 
but the event handler doesn't seem to get called when the instance gets 
loaded with the query.  I'll try and do a minimal little standalone test to 
make sure it isn't something in my system messing things up, but in theory 
this should work?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/rQwgslRRDGsJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to