Hi!

In SqlAlchemy 0.4 when I tried to save (using method "save") to
database object which interferes row which already exists in database
(for example I have table with primary key `id`, row with id = 3 in
this table, and I am trying to save object with the same id = 3) the
operation raises error that object is already persistent.

In Sqlalchemy 0.5.7 there is no "save" method, but there is "add"
method. But when I'm trying to save (using "add" method) object which
interferes row which is already in database - operation is successful.
But I need to have some error raised in that situation, or maybe other
solution that informs me that I'm not actually inserting object but
updating.

What method can I use? I read documentation and I didn't found
solution.

Am I missing something?

Szymon

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

Reply via email to