From 5f858e16b0becea867948f26f0d3e342d08a9da6 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 17 Jan 2007 21:51:07 +0000 Subject: [PATCH] tweaks --- doc/build/content/tutorial.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/build/content/tutorial.txt b/doc/build/content/tutorial.txt index f494e379a4..e8cb2e3079 100644 --- a/doc/build/content/tutorial.txt +++ b/doc/build/content/tutorial.txt @@ -418,6 +418,7 @@ When our User object contains relationships to other kinds of information, such To illustrate this relationship, we will start with a new mapper configuration. Since our `User` class has a mapper assigned to it, we want to discard it and start over again. So we issue the `clear_mappers()` function first, which removes all mapping associations from classes: + {python} >>> clear_mappers() When removing mappers, it is usually best to remove all mappings at the same time, since mappers usually have relationships to each other which will become invalid if only part of the mapper collection is removed. In practice, a particular mapping setup will usually remain throughout the lifetime of an application. Clearing out the mappers and making new ones is a practice that is generally limited to writing mapper unit tests and experimenting from the console. @@ -436,6 +437,7 @@ Next, we want to create a class/mapping that corresponds to the `email_addresses We then create a mapper for the `User` class which contains a relationship to the `Address` class using the `relation()` function: + {python} >>> mapper(User, users_table, properties={ # doctest: +ELLIPSIS ... 'addresses':relation(Address) ... }) -- 2.47.2