<?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: SQLAlchemy: beware of backref</title>
	<atom:link href="http://pieces.openpolitics.com/2006/07/sqlalchemy-beware-of-backref/feed/" rel="self" type="application/rss+xml" />
	<link>http://pieces.openpolitics.com/2006/07/sqlalchemy-beware-of-backref/</link>
	<description>Puzzlings on software development and other topics of interest</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:00:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: mike bayer</title>
		<link>http://pieces.openpolitics.com/2006/07/sqlalchemy-beware-of-backref/comment-page-1/#comment-78</link>
		<dc:creator>mike bayer</dc:creator>
		<pubDate>Mon, 14 Aug 2006 05:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://pieces.openpolitics.com/2006/07/sqlalchemy-beware-of-backref/#comment-78</guid>
		<description>one thing that hasnt been documented, is that SQLAlchemy&#039;s backrefs actually have a similarity to Hibernate, in that one side of a bi-directional relationship likes to have a flag on it to indicate that fact, exactly in the same manner as Hibernate&#039;s  &#039;inverse=&quot;true&quot;&#039; flag; except the flag is called &quot;is_backref&quot;.  normally, when using the regular &quot;backref&quot; keyword option, the &quot;is_backref&quot; flag is set up by the Backref object that is created.  but if you are doing a &quot;manual&quot; backref like in this example, youll want to put &quot;is_backref=True&quot; on the side of the bi-directional relationship that youd like &quot;ignored&quot;.



also the issue of &quot;cant append to a list without lazy loading its contents first&quot; has been raised repeatedly on the mailing list; eventually i might get around to figuring something out with this one, although its a little involved (i.e., a list you can append() to, but it doesnt know about the rest of its contents...might go with hibernates &quot;extra-lazy-loading&quot; approach).</description>
		<content:encoded><![CDATA[<p>one thing that hasnt been documented, is that SQLAlchemy&#8217;s backrefs actually have a similarity to Hibernate, in that one side of a bi-directional relationship likes to have a flag on it to indicate that fact, exactly in the same manner as Hibernate&#8217;s  &#8216;inverse=&#8221;true&#8221;&#8216; flag; except the flag is called &#8220;is_backref&#8221;.  normally, when using the regular &#8220;backref&#8221; keyword option, the &#8220;is_backref&#8221; flag is set up by the Backref object that is created.  but if you are doing a &#8220;manual&#8221; backref like in this example, youll want to put &#8220;is_backref=True&#8221; on the side of the bi-directional relationship that youd like &#8220;ignored&#8221;.</p>
<p>also the issue of &#8220;cant append to a list without lazy loading its contents first&#8221; has been raised repeatedly on the mailing list; eventually i might get around to figuring something out with this one, although its a little involved (i.e., a list you can append() to, but it doesnt know about the rest of its contents&#8230;might go with hibernates &#8220;extra-lazy-loading&#8221; approach).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

