I am looking at using the InstrumentationManager to add
AttributeExtension's to my objects.
I am using Elixir 0.6, SQL Alchemy 0.5.3

 From what I can gather, I need to add
'__sa_instrumentation_manager__' all my mapped classes.

Currently, with using the Elixir Metaclass, I have one class that is
the root of them all, but which is not mapped.

Something like the following:


class ElementInstrumentationManager(InstrumentationManager):
    def __init__(self, class_):
        self.class_ = class_

    def post_configure_attribute(self, class_, key, instr_attr):
        pass


class Element(object)
    __metaclass__ = ElixirMeta
    __sa_instrumentation_manager__ = ElementInstrumentationManager



It seems as soon as I add __sa_instrumentation_manager__ =
ElementInstrumentationManager
I begin to have problems with the session identity_map changing size.
Since this is single threaded, I can only assume that I am fighting
with the GC, and the WeakRef Map.

(I can turn off the weak_ref identity map, but that seems to have
other side-effects that I am not totally aware.
That is one solution, but I want to understand the current problem
before I go there, if possible)

I have been reading the code in session.py, identity.py, and
attribute.py.    I am beginning to get the gist.  Kinda.

Anyone seen this before and have an obvious answer.
It kinda seems that the default ClassMananger and the wrapped
InstrumentationManager aren't really interchangable.




--~--~---------~--~----~------------~-------~--~----~
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