On May 6, 2008, at 5:24 PM, Martijn Faassen wrote:
Thanks for the input!
Michael Bayer wrote:
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
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.
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -