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

>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/oCVN7_jgj4cJ.
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