[Zope-dev] Re: zope.sqlalchemy
Michael Bayer
mike_mp at zzzcomputing.com
Tue May 6 19:13:53 EDT 2008
On May 6, 2008, at 5:24 PM, Martijn Faassen wrote:
> Hey Michael,
>
> Thanks for the input!
>
> Michael Bayer wrote:
> [snip]
>> So I've already not liked save_on_init for a couple of years due to
>> its inherent intrusiveness, and because SA historically does not
>> like being in the business of providing framework features (though
>> we have decided to stay in that arena to some degree with
>> declarative and scoped_session).
>
> I'll try to summarize the discussion so I can find out whether I
> understand it. Basically you're saying you don't think save on
> instantiation is a good idea generally, and that we should be using
> session.save(). This is going to be changed to session.add() in the
> future. What would session.add_all() do?
session.add_all() is just: session.add_all([obj1, obj2, obj3, ...])
Also session.save()/update/save_or_update will remain throughout 0.5
at least.
> This ties into the mapper feature, which also offers other features.
> The one feature that will remain but in a new shape, without the
> mapper, is the ability to do MyClass.query.
>
>
> Is that a correct summary?
Session.mapper and save_on_init has no plans of going away in 0.5, but
I plan to de-emphasize it. The "query" descriptor function is also
available in 0.4.
- mike
More information about the Zope-Dev
mailing list