Christopher Arndt schrieb:
> I find the three main session-aware mapper features (the
> 'MappedClass.query' attribute, the 'MappedClass(attr1=value,
> attr2=value,...)' constructor and the automatic adding to the session of
> new instances) very convenient and I do not really understand, why this
> was dropped from SA and what the advantage of having to use
> session.query(cls) and session.add(instance) all the time is.

I also like the feature and will ask about that on the SA mailing list.

> So, I propose the following patch to turbogears.database. I have tested
> this with an app that makes heavy use of the session-aware mapper
> features and encountered no problems so far.
> 
> http://trac.turbogears.org/ticket/2359

Great! Actually I also considered implementing it this way; I was just 
too lazy. But as the saying goes "Wenn man et sisch bequem kann maache, 
da soll ma net zä fuul för sing" (you're obviously from Cologne ;-)

> Additionally, we could add a deprecation warning, when the emulated
> session-aware mapper is used. Also, should we document somewhere how to
> suppress this warning and the SADeprecationWarning when Session.mapper
> is used?

Yes, if this will be an official TG 1.1 feature then there should be no 
deprecation warning.

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to