oh right, old_init(), sorry, didnt read the first post carefully. i almost think the answer here might be to not even create the modified __init__()/old_init() method in the general case...if youre calling session.save(someobject) its not really needed.
but for now...maybe class.__init__.func_globals['oldinit'] ? On Feb 5, 8:37 am, svilen <[EMAIL PROTECTED]> wrote: > unless Mike puts the old_init back under the object and call > self.old_init() instead of that local-ref, u can only hack the source > of Mapper._compile(), either by hand staticaly or at runtime (obtain > the func src, patch it, compile into python, replace the original - > see that sa_hack* inhttp://linuxteam.sistechnology.com/o2rm/). But > this assumes u have SA as source (and not eggs), the version matches > your patch, and u are able to patch this _before_ the other part of > app uses mappers in some way. > In case u want this on some old SA version (and not trunk), hacking > might be the only way. > btw if u find a way to obtain some externaly-bound non-global > reference from func's code (see what dis.dis() shows), DO mail... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
