]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix...
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 9 Dec 2007 18:27:01 +0000 (18:27 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 9 Dec 2007 18:27:01 +0000 (18:27 +0000)
doc/build/content/ormtutorial.txt

index 2dd59f3559d77dd928f4db700f5defb684483a39..fbbd3c5525ec31e80c42fb62d959085fc9a61cb9 100644 (file)
@@ -1083,12 +1083,12 @@ We can now look up all blog posts with the keyword 'firstpost'.   We'll use a sp
 
     {python}
     {sql}>>> session.query(BlogPost).filter(BlogPost.keywords.any(keyword='firstpost')).all()
-    INSERT INTO posts (user_id, headline, body) VALUES (?, ?, ?)
-    [2, "Wendy's Blog Post", 'This is a test']
     INSERT INTO keywords (keyword) VALUES (?)
     ['wendy']
     INSERT INTO keywords (keyword) VALUES (?)
     ['firstpost']
+    INSERT INTO posts (user_id, headline, body) VALUES (?, ?, ?)
+    [2, "Wendy's Blog Post", 'This is a test']
     INSERT INTO post_keywords (post_id, keyword_id) VALUES (?, ?)
     [[1, 1], [1, 2]]
     SELECT posts.id AS posts_id, posts.user_id AS posts_user_id, posts.headline AS posts_headline, posts.body AS posts_body