summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-12-18 00:24:03 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-12-18 00:24:03 +0000
commitf6068a3522bb92fac18c930eb26798fc4cb1889f (patch)
tree2ce96db7758621f605ea605342a106309e134d56 /doc
parent420c098d56e9925b51067711c6817475165c6af2 (diff)
downloadsqlalchemy-f6068a3522bb92fac18c930eb26798fc4cb1889f.tar.gz
- select().as_scalar() will raise an exception if the select does not have
exactly one expression in its columns clause. - added "helper exception" to select.type access, generic functions raise the chance of this happening - a slight behavioral change to attributes is, del'ing an attribute does *not* cause the lazyloader of that attribute to fire off again; the "del" makes the effective value of the attribute "None". To re-trigger the "loader" for an attribute, use session.expire(instance, [attrname]). - fix ormtutorial for IS NULL
Diffstat (limited to 'doc')
-rw-r--r--doc/build/content/ormtutorial.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/build/content/ormtutorial.txt b/doc/build/content/ormtutorial.txt
index fbbd3c552..a0382708e 100644
--- a/doc/build/content/ormtutorial.txt
+++ b/doc/build/content/ormtutorial.txt
@@ -807,15 +807,13 @@ A summary of all operators usable on relations:
[5]
{stop}[]
- a comparison to `None` also generates a negated EXISTS clause:
+ a comparison to `None` also generates an IS NULL clause for a many-to-one relation:
{python}
{sql}>>> session.query(Address).filter(Address.user==None).all()
SELECT addresses.id AS addresses_id, addresses.email_address AS addresses_email_address, addresses.user_id AS addresses_user_id
FROM addresses
- WHERE NOT (EXISTS (SELECT 1
- FROM users
- WHERE users.id = addresses.user_id)) ORDER BY addresses.oid
+ WHERE addresses.user_id IS NULL ORDER BY addresses.oid
[]
{stop}[]