One thing I forgot to mention earlier: Unlike the code for SA 0.1, this patch provides identity/visit table schemas that are identical to what the SQLObject stuff uses. It should in theory be possible to switch between the two with regard to the identity/visit-related tables.
Arnar On 6/8/06, Arnar Birgisson <[EMAIL PROTECTED]> wrote: > Hi there, > > I ported the SA-related code in TG to SQLAlchemy 0.2. I haven't tested > this much in a real-life project but basic stuff (identity and visit > tracking, automatic commit/rollback at end of request etc.) seems to > work. > > I'm not sure if posting patches here is appropriate, but since there > has been some discussion on this I'd like to put it out there so > anyone who's interested can have a look and try it. > > I'm using the threadlocal mod, so SA behaviour is almost identical to > 0.1. However, there is no dependency on ActiveMapper and the > monkeypatch function "assign_mapper" is not used in the supplied > Identity/Visit classes. > > This is against TG trunk (revision 1535) and tested with SQLAlchemy > 0.2.2. Note that I had to do a small correction in SA to get things to > work: > > in line 15 of sqlalchemy/orm/query.py, change from > self.mapper = class_mapper(class_or_mapper, entity_name=entity_name) > to > self.mapper = mapper.class_mapper(class_or_mapper, entity_name=entity_name) > > Arnar > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears -~----------~----~----~----~------~----~------~--~---

