]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix small update doc issue [ticket:2158]
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 8 Jan 2012 16:54:17 +0000 (11:54 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 8 Jan 2012 16:54:17 +0000 (11:54 -0500)
lib/sqlalchemy/ext/sqlsoup.py

index 302b511a12c829b33fe68395212fbf15ee5ab4ad..4dd9e9e4d2d8857f76f3f4ac0512baad4e5e8cdc 100644 (file)
@@ -159,7 +159,7 @@ construction rules apply here as to the select methods::
 You can similarly update multiple rows at once. This will change the
 book_id to 1 in all loans whose book_id is 2::
 
-    >>> db.loans.update(db.loans.book_id==2, book_id=1)
+    >>> db.loans.filter_by(db.loans.book_id==2).update({'book_id':1})
     >>> db.loans.filter_by(book_id=1).all()
     [MappedLoans(book_id=1,user_name=u'Joe Student',
         loan_date=datetime.datetime(2006, 7, 12, 0, 0))]