Shuaib Osman wrote: > > Hi, > > I've been playing around with SA for about a week now and need a > custom ORM. > > The datatype that will hold all data is essentially a modified > dictionary - the key of the dictionary (may be a tuple) is the key in > the database and the list associated is the rest of the row. However, > some of the elements in the list may itself be a modified dictionary > as well. Essentially you have a tree-like structure of dictionaries > within dictionaries. There will be information in the dictionary > structure to resolve foreign key constraints. > > Basically all transactions will return this mod. dict and will then > need to write it back to a db. Looking at the current orm, I'd have to > define classes separately and create relations between them for each > top-level dictionary. I don't want to do that - I don't want to re- > define the whole session and UOWTransaction classes either. Is there a > way I can modify the session/UOWTransaction classes to pick up the > dependencies from the dictionaries and proceed as before without > defining any mappers? > > I don't mind changing the code (with some guidance).
have you looked at the SQLSoup extension ? Its not quite this, but does something similar. It at least can be a guide for how to use the ORM without explicit definition of classes. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
