Hi Arnar,

Thanks! You just saved me the effort of doing this! (Which will let me
spend more time writing the chapter for the book, rather than getting
SQLAlchemy to work :)

Can you put this into a Trac ticket with milestone 1.0b1?

Kevin

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


-- 
Kevin Dangoor
TurboGears / Zesty News

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

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

Reply via email to