summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-03-14 16:49:15 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-03-14 16:49:15 +0000
commitfc43d50cec01cf3adf7a37b799f470f9445f3313 (patch)
tree623d8702b1318dac33f0a2f73a08cb0dcf104c54
parenta9f83cf3a65fd198e4d61387c91217c6d262a025 (diff)
downloadsqlalchemy-fc43d50cec01cf3adf7a37b799f470f9445f3313.tar.gz
formatting...
-rw-r--r--doc/build/content/datamapping.myt6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/build/content/datamapping.myt b/doc/build/content/datamapping.myt
index febf9bf8b..10dd6e475 100644
--- a/doc/build/content/datamapping.myt
+++ b/doc/build/content/datamapping.myt
@@ -343,16 +343,16 @@ DELETE FROM addresses WHERE addresses.address_id = :address_id
True
</&>
-+<p>The backreference feature also works with many-to-many relationships, which are described later. When creating a backreference, a corresponding property is placed on the child mapper. The default arguments to this property can be overridden using the <span class="codeline">backref()</span> function:
+<p>The backreference feature also works with many-to-many relationships, which are described later. When creating a backreference, a corresponding property is placed on the child mapper. The default arguments to this property can be overridden using the <span class="codeline">backref()</span> function:
<&|formatting.myt:code&>
Address.mapper = mapper(Address, addresses)
User.mapper = mapper(User, users, properties = {
- 'addresses' : relation(Address.mapper, backref=backref('user', lazy=False, private=True))
+ 'addresses' : relation(Address.mapper,
+ backref=backref('user', lazy=False, private=True))
}
)
</&>
-<p>Note that when overriding a backreferenced property, we re-specify the backreference as well. This will not override the existing 'addresses' property on the User class, but just sends a message to the attribute-management system that it should continue to maintain this backreference.</p>
</&>
<&|doclib.myt:item, name="cascade", description="Creating Relationships Automatically with cascade_mappers" &>
<p>The mapper package has a helper function <span class="codeline">cascade_mappers()</span> which can simplify the task of linking several mappers together. Given a list of classes and/or mappers, it identifies the foreign key relationships between the given mappers or corresponding class mappers, and creates relation() objects representing those relationships, including a backreference. Attempts to find