<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Another Step-by-Step SqlAlchemy Tutorial (part 2 of 2)</title>
	<atom:link href="http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/</link>
	<description>Python Programming from the Frontlines</description>
	<lastBuildDate>Sun, 05 Feb 2012 20:38:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Digimasterdoug</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-20976</link>
		<dc:creator>Digimasterdoug</dc:creator>
		<pubDate>Tue, 15 Jun 2010 10:29:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-20976</guid>
		<description>this is hands down the best practical sqlalchemy tutorial ive encountered to date.  thanks a ton!</description>
		<content:encoded><![CDATA[<p>this is hands down the best practical sqlalchemy tutorial ive encountered to date.  thanks a ton!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-16968</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 05 Feb 2010 19:05:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-16968</guid>
		<description>@ jotr,

Added a note to that affect in that section. Mental note: don&#039;t get interrupted when working on next tutorial...

- Mike</description>
		<content:encoded><![CDATA[<p>@ jotr,</p>
<p>Added a note to that affect in that section. Mental note: don&#8217;t get interrupted when working on next tutorial&#8230;</p>
<p>- Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-22877</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 05 Feb 2010 19:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-22877</guid>
		<description>@ jotr,

Added a note to that affect in that section. Mental note: don&#039;t get interrupted when working on next tutorial...

- Mike</description>
		<content:encoded><![CDATA[<p>@ jotr,</p>
<p>Added a note to that affect in that section. Mental note: don&#8217;t get interrupted when working on next tutorial&#8230;</p>
<p>- Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jotr</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-16966</link>
		<dc:creator>jotr</dc:creator>
		<pubDate>Fri, 05 Feb 2010 19:00:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-16966</guid>
		<description>I find the joins work better after calling session.add(prof).</description>
		<content:encoded><![CDATA[<p>I find the joins work better after calling session.add(prof).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jotr</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-22876</link>
		<dc:creator>jotr</dc:creator>
		<pubDate>Fri, 05 Feb 2010 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-22876</guid>
		<description>I find the joins work better after calling session.add(prof).</description>
		<content:encoded><![CDATA[<p>I find the joins work better after calling session.add(prof).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-16926</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 05 Feb 2010 00:33:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-16926</guid>
		<description>@ jotr,

I actually tested all those methods on the declarative model...but yes, they all should work just fine.

Hmmm...looks like I dropped the create_all call from the declarative example. I just fixed that. 

I messed around with the dirty call in Wing and discovered that if I add the user to the database with a session.commit() and then change one of the user&#039;s attributes, then session.dirty picks it up. This is not clear in the official documentation. I updated this post to reflect that.

- Mike</description>
		<content:encoded><![CDATA[<p>@ jotr,</p>
<p>I actually tested all those methods on the declarative model&#8230;but yes, they all should work just fine.</p>
<p>Hmmm&#8230;looks like I dropped the create_all call from the declarative example. I just fixed that. </p>
<p>I messed around with the dirty call in Wing and discovered that if I add the user to the database with a session.commit() and then change one of the user&#8217;s attributes, then session.dirty picks it up. This is not clear in the official documentation. I updated this post to reflect that.</p>
<p>- Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-22875</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Fri, 05 Feb 2010 00:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-22875</guid>
		<description>@ jotr,

I actually tested all those methods on the declarative model...but yes, they all should work just fine.

Hmmm...looks like I dropped the create_all call from the declarative example. I just fixed that. 

I messed around with the dirty call in Wing and discovered that if I add the user to the database with a session.commit() and then change one of the user&#039;s attributes, then session.dirty picks it up. This is not clear in the official documentation. I updated this post to reflect that.

- Mike</description>
		<content:encoded><![CDATA[<p>@ jotr,</p>
<p>I actually tested all those methods on the declarative model&#8230;but yes, they all should work just fine.</p>
<p>Hmmm&#8230;looks like I dropped the create_all call from the declarative example. I just fixed that. </p>
<p>I messed around with the dirty call in Wing and discovered that if I add the user to the database with a session.commit() and then change one of the user&#8217;s attributes, then session.dirty picks it up. This is not clear in the official documentation. I updated this post to reflect that.</p>
<p>- Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jotr</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-16922</link>
		<dc:creator>jotr</dc:creator>
		<pubDate>Thu, 04 Feb 2010 22:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-16922</guid>
		<description>Ah, I had to add a metadata.create_all(engine) after creating the metadata object.  Also I notice that even though I alter the &#039;mike_user&#039; object after calling session.add(), session.dirty does not reflect the change.</description>
		<content:encoded><![CDATA[<p>Ah, I had to add a metadata.create_all(engine) after creating the metadata object.  Also I notice that even though I alter the &#8216;mike_user&#8217; object after calling session.add(), session.dirty does not reflect the change.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jotr</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-22874</link>
		<dc:creator>jotr</dc:creator>
		<pubDate>Thu, 04 Feb 2010 22:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-22874</guid>
		<description>Ah, I had to add a metadata.create_all(engine) after creating the metadata object.  Also I notice that even though I alter the &#039;mike_user&#039; object after calling session.add(), session.dirty does not reflect the change.</description>
		<content:encoded><![CDATA[<p>Ah, I had to add a metadata.create_all(engine) after creating the metadata object.  Also I notice that even though I alter the &#8216;mike_user&#8217; object after calling session.add(), session.dirty does not reflect the change.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jotr</title>
		<link>http://www.blog.pythonlibrary.org/2010/02/03/another-step-by-step-sqlalchemy-tutorial-part-2-of-2/comment-page-1/#comment-16921</link>
		<dc:creator>jotr</dc:creator>
		<pubDate>Thu, 04 Feb 2010 22:37:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.pythonlibrary.org/?p=517#comment-16921</guid>
		<description>When I try to do a session.commit() after the session.add_all(...) example above, I get this error:

sqlalchemy.exc.OperationalError: (OperationalError) no such table: users u&#039;INSERT INTO users (name, fullname, password) VALUES (?, ?, ?)&#039; [&#039;mike&#039;, &#039;Mike Dirtskill&#039;, &#039;password&#039;]

Should the add_all() code work when appended to the declarative table definitions above?</description>
		<content:encoded><![CDATA[<p>When I try to do a session.commit() after the session.add_all(&#8230;) example above, I get this error:</p>
<p>sqlalchemy.exc.OperationalError: (OperationalError) no such table: users u&#8217;INSERT INTO users (name, fullname, password) VALUES (?, ?, ?)&#8217; ['mike', 'Mike Dirtskill', 'password']</p>
<p>Should the add_all() code work when appended to the declarative table definitions above?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.453 seconds -->

