On 7/19/06, Kapil Thangavelu <[EMAIL PROTECTED]> wrote:
The desire is definitely not to have SA automatically remove the
offending object from unit-of-work and continue with the rest. It
would be far too complicated and dangerous given the complex
interdependencies of objects.
But in order that the program can do something about the problem, it
must know first which object is causing the error. My original concern
is that when I am performing nearly identical operation on a series of
objects of the same type (e.g. modifying a product catalog),
session.flush() will not tell me which one is wrong.
I think the solution for this specific use case is what you said:
instead of using just session.flush(), I will loop through the changed
objects and do session.flush(obj) on them one by one. This way in case
of exception it would be clear which one is the culprit.
Thanks for all you opinions.
--
Hong Yuan
大管家网上建材超市
装修装潢建材一站式购物
http://www.homemaster.cn
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users