summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-01-08 01:35:56 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-01-08 01:35:56 +0000
commitd7cb91284f79cc043a352c95e01b0c38acc6ed7e (patch)
treee9bc28c8471cb874b4801b7822af56e4a7c98762
parente8a90dc0a1237412bad1eddaa43911f64130018d (diff)
downloadsqlalchemy-d7cb91284f79cc043a352c95e01b0c38acc6ed7e.tar.gz
removed 'primarytable' keyword argument
-rw-r--r--doc/build/content/adv_datamapping.myt6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/build/content/adv_datamapping.myt b/doc/build/content/adv_datamapping.myt
index 1a6cce833..0dc1a0349 100644
--- a/doc/build/content/adv_datamapping.myt
+++ b/doc/build/content/adv_datamapping.myt
@@ -227,7 +227,7 @@ WHERE rowcount.user_id = users.user_id ORDER BY users.oid, addresses.oid
<&|formatting.myt:code&>
# join users and addresses
usersaddresses = sql.join(users, addresses, users.c.user_id == addresses.c.user_id)
- m = mapper(User, usersaddresses, primarytable = users,
+ m = mapper(User, usersaddresses,
properties = {
'id' : [users.c.user_id, addresses.c.user_id],
}
@@ -391,7 +391,7 @@ WHERE rowcount.user_id = users.user_id ORDER BY users.oid, addresses.oid
class Customer(object):
pass
- mapper = mapper(Customer, s, primarytable=customers)
+ mapper = mapper(Customer, s)
</&>
<p>Above, the "customers" table is joined against the "orders" table to produce a full row for each customer row, the total count of related rows in the "orders" table, and the highest price in the "orders" table, grouped against the full set of columns in the "customers" table. That query is then mapped against the Customer class. New instances of Customer will contain attributes for each column in the "customers" table as well as an "order_count" and "highest_order" attribute. Updates to the Customer object will only be reflected in the "customers" table and not the "orders" table. This is because the primary keys of the "orders" table are not represented in this mapper and therefore the table is not affected by save or delete operations.</p>
</&>
@@ -713,4 +713,4 @@ a full round-trip attribute tracking operation is illustrated:</p>
</&>
<p>Objects that contain the attribute "_instance_key" are already registered with the Identity Map, and are assumed to have come from the database. They therefore get marked as "dirty" when changes happen. Objects without an "_instance_key" are not from the database, and get marked as "new" when changes happen, although usually this will already have occured via the object's __init__ method.</p>
</&>
-</&> \ No newline at end of file
+</&>