Xavian wrote: > 1) Is there a way to give SqlSoup hints on how to handle the lack of a > primary key so that the selection and mapping magic will work > correctly instead of raising a PKNotFoundError exception?
SQLSoup tables are all mapped classes. a mapper() always needs a primary key. so at the very least you'd need to *identify* a primary key on the table and specify it to the mapper, although I don't know that SQLSoup allows options like that through. > > 2) Barring that, is there a way to pass row column values to a > function that will generate a MappedItemattribs instance so I can > access fields as members instead of having to use offsets I'd need to > via execute() results? unfortunately SQLSoup is a lot simpler than that and you'd have to hack into it to get the results you want. > > I really really like SqlSoup and was hoping it would save me grief of > raw SQL against these legacy tables, but if I find more tables I need > to query that lack primary keys, I'd wondering if it might just be > easier to use raw MySQLdb instead of trying to mix-n-match approaches. > I'm worried about anyone else (or myself) being able to follow/ > maintain this code later if I have to use a full hybrid approach. there is the option to use the SQLAlchemy ORM directly ? sqlsoup is not really supported very much. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---