diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-24 22:19:31 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-24 22:19:31 +0000 |
| commit | b7d1d6deab0716ac49b5cb25656f3ce895b6775a (patch) | |
| tree | 86c9524920fcb2c3f1b51f1ccaec66e0eb67d560 /doc | |
| parent | 6e565f723149965911d899a753aaf35b07273071 (diff) | |
| download | sqlalchemy-b7d1d6deab0716ac49b5cb25656f3ce895b6775a.tar.gz | |
- SingletonConnectionPool must use the "threadlocal" pooling behavior
- the "delete" cascade will load in all child objects, if they were not
loaded already. this can be turned off (i.e. the old behavior) by setting
passive_deletes=True on a relation().
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/build/content/adv_datamapping.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/build/content/adv_datamapping.txt b/doc/build/content/adv_datamapping.txt index ccbadc30e..0a0274c46 100644 --- a/doc/build/content/adv_datamapping.txt +++ b/doc/build/content/adv_datamapping.txt @@ -269,6 +269,7 @@ Keyword options to the `relation` function include: * post_update - this indicates that the relationship should be handled by a second UPDATE statement after an INSERT, or before a DELETE. using this flag essentially means the relationship will not incur any "dependency" between parent and child item, as the particular foreign key relationship between them is handled by a second statement. use this flag when a particular mapping arrangement will incur two rows that are dependent on each other, such as a table that has a one-to-many relationship to a set of child rows, and also has a column that references a single child row within that list (i.e. both tables contain a foreign key to each other). If a flush() operation returns an error that a "cyclical dependency" was detected, this is a cue that you might want to use post_update. * viewonly=(True|False) - when set to True, the relation is used only for loading objects within the relationship, and has no effect on the unit-of-work flush process. relations with viewonly can specify any kind of join conditions to provide additional views of related objects onto a parent object. * collection_class = None - a class or function that returns a new list-holding object. will be used in place of a plain list for storing elements. +* passive_deletes = False - if False, child instances will be loaded from the database into the current session when a parent instance is deleted so that delete cascade can be processed on those child instances, even if they were not loaded already. When set to True, lazy loaders will not be fired off in order to process a "delete" cascade, which is appropriate if "ON DELETE" rules have been set up on the database tables themselves. ### Controlling Ordering {@name=orderby} |
