Hi,

> uh thats a little weird since the InstrumentationManager is designed
> to be the thing you subclass.  you're not supposed to subclass
> ClassManager.   There should be no difference in behavior subclassing
> one or the other.


It behaves a little weird to when I tried it myself.  I'll stick to
the InstrumentationManager then if that's the way to do it.

>
>
>> At the moment I think the problem lies with how attributes are get and
>> set.  From what I understand from going through the SA source is that
>> the mapper places decoraters on the attributes once Declarative has
>> created the appropriate tables.  And Traits does something similar
>> though I'm not quite sure how.  The entire process seems rather
>> complex, complicated by the fact that Traits sometimes writes directly
>> to the __dict__ of an instance without going through setattr first
>> (which I'm guessing is what's needed by SA for its bookkeeping).
>
> yeah thats all true but the point of InstrumentationManager is that
> its all OK - you send SQLA the events it needs.


The question is what events does it need?


>> I'm quite sure that the SQL SA produces is correct, it's just the
>> object's state that isn't being handled properly.  Is there some
>> documentation somewhere that explains what the various methods in the
>> interface (either InstrumentationManager or ClassManager) are supposed
>> to do?  For instance is install_state(self, class_, instance, state)
>> supposed to copy the data in the state parameter to the instance or
>> merely store it for future use by state_getter ?
>
> well thats all internal-ish API for which you'd have to just trace out
> the flow of data.    install_state() for example just sticks an
> InstanceState attributre on a given instance.


I've been stepping through the code for several days now and I'm
slowly starting to understand what SA needs and how it operates, not
there yet though.  Do you perhaps know of another project that uses
the InstrumentationManager interface?  Seeing some implemented code
would certainly help out my understanding.


I'm just glad that debugging python is much more fun than debugging c++.


Let me know if you see some flaws in my code.

Thanks for your help Michael.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
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