unfortunately the instrumentation is at the class level, so you'd have  
to clone the state of the object into a different object compatible  
with PyAMF.   If you're looking for straight lists and dicts it seems  
like even a JSON encoding phase could be an easy way to achieve this.

I would also posit that PyAMF's behavior might be inappropriate in  
this case.  InstrumentedList is a subclass of list so I don't  
immediately see why it would treat it differently.


On Dec 3, 2008, at 12:28 PM, Simon wrote:

>
> Hi there,
>
> is there any canonical way of removing all SQAlchemy instrumentation
> from a mapped object?
>
> I'm trying to feed a complex mapped class instance through PyAMF
> (which serializes objects to be read in Adobe Flash). This works fine
> for scalar attributes but not for collections, e.g. a one-to-many
> relation collection. PyAMF getattr()s the list, which is actually not
> a list() but a sqlalchemy.orm.collections.InstrumentedList, and
> subsequently tries to encode all of its _* and __* attributes.
>
> Thanks, Simon
>
> >


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

Reply via email to