Hi Julian, Thanks, I am looking into it and it looks interesting. Have you done much testing yet? How do you (plan to; haven't looked at too much detail yet) check for circular references (like backrefs)?
Cheers, Lars On Thursday, March 22, 2012 11:36:41 AM UTC+1, lars van gemerden wrote: > > Hi, > > I am looking for a way to convert SQLalchemy objects to XML and back, in > order to support a webapplication. I made a mixin class that does a decent > job on 'normal' python objects (basically works for in the same cases as > pickle, though more testing is required). I would prefer to have a simple > mixin interface with something like: > > def toXML(): > 'convert attributes to xml' > return xmlstring > > def fromXML(xmlstring) > 'update attributes from xml' > > The most simple case would be that the web user request indicates the > primary key of the object, gets the corrsponding xml string in return, > changes fields in the xml string and posts it back, which leads to an > update of the object. > > I have formulated a couple of initial questions: > > - what attributes should be converted to and from xml? > - how do i handle foreign keys on the 'other' side? > > Note that the object remains in memory during the user interaction, so it > does not have to be reinitialized from scratch. > > Cheers, Lars > > > -- 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/-/QNBLxpPxDBgJ. 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.
