From f6068a3522bb92fac18c930eb26798fc4cb1889f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 18 Dec 2007 00:24:03 +0000 Subject: - 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 --- doc/build/content/ormtutorial.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'doc') 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}[] -- cgit v1.2.1