well delete() doesnt mean "remove this object from the session"... it  
means "mark this persistent object to be removed from the database".   
otherwise then youd be having the delete() method deliver two  
distinct sets of functionality based on what youre sending to it.  id  
rather have a delete_or_expunge() or seomthing like that so people  
can be explicit if they want that, which would be more consistent  
with the notion of save()/update()/save_or_update() (remember we're  
largely imitating Hibernate in this one particular area, i.e. Session  
interface).

I think Session is better served by being very strict about what you  
can do with it, and forcing explicitness.  while its reasonably OK  
right now it needs a lot more work in this area since i havent taken  
the time to go through every potential assertion...

On Jul 22, 2006, at 11:05 AM, Brett wrote:

> Couldn't it just be removed from the session as if it were persistent.
> That way persistent and pending objects would act more or less the  
> same.
>
> On Fri, 2006-07-21 at 21:55 -0400, Michael Bayer wrote:
>> it should raise an error when you go to delete() it because sp2 is
>> not persistent; it makes no sense to call delete on it.
>>
>
>
>
> ---------------------------------------------------------------------- 
> ---
> 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


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

Reply via email to