]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fix to "proxy=True" behavior on synonym()
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Jan 2007 03:14:59 +0000 (03:14 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Jan 2007 03:14:59 +0000 (03:14 +0000)
CHANGES
lib/sqlalchemy/orm/properties.py
test/orm/mapper.py

diff --git a/CHANGES b/CHANGES
index 6d6aaf794af10c08188ca49022def05311905e3b..28a3c1270be09daa3edabc1c1d51ba56f417fd48 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -55,6 +55,7 @@
   - some deeper error checking when compiling relations, to detect an ambiguous "primaryjoin"
   in the case that both sides of the relationship have foreign key references in the primary
   join condition
+  - fix to "proxy=True" behavior on synonym()
   - fixed bug where delete-orphan basically didn't work with many-to-many relationships [ticket:427],
   backref presence generally hid the symptom
   - added a mutex to the mapper compilation step.  ive been reluctant to add any kind
index ef7c8236000fc64ad485a7eb8fd64b3e079f6958..452af04cc9361324f74f0a19066653e4401cfad2 100644 (file)
@@ -31,7 +31,6 @@ class SynonymProperty(MapperProperty):
         class SynonymProp(object):
             def __set__(s, obj, value):
                 setattr(obj, self.name, value)
-                self.set(None, obj, value)
             def __delete__(s, obj):
                 delattr(obj, self.name)
             def __get__(s, obj, owner):
index 519d2364015f1e77f6867bb249ceb105c3b5c97a..3ce8c4f336200928374b971ef382f1e772973517 100644 (file)
@@ -396,6 +396,12 @@ class MapperTest(MapperSuperTest):
         
         u = sess.query(User).get_by(uname='jack')
         self.assert_result(u.adlist, Address, *(user_address_result[0]['addresses'][1]))
+
+        assert u not in sess.dirty
+        u.uname = "some user name"
+        assert u.uname == "some user name"
+        assert u.user_name == "some user name"
+        assert u in sess.dirty
     
     def testextensionoptions(self):
         sess  = create_session()