> -----Original Message-----
> From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
> On Behalf Of Gunnlaugur Briem
> Sent: 27 July 2011 10:36
> To: sqlalchemy@googlegroups.com
> Subject: Re: RE: [sqlalchemy] Updating records in table not working
> 
> On Wednesday, 27 July 2011 08:23:14 UTC, Simon King wrote:
> 
>       > I've looked at the SA documentation and as far as I can see
> the 'add'
>       > does an insert or an update.
> 
>       I think this is incorrect - 'add' always corresponds to
> 'INSERT'
> 
> Only for brand new instances, not associated with a session. For
> *detached* instances the identity is known and the instances will be
> in session but not in session.new, so an UPDATE will be issued.
> 
> Regards,
> 
> - Gulli
> 

Ah, I see. Thanks for the clarification.

Cheers,

Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to