summaryrefslogtreecommitdiff
path: root/test/orm/mapper.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/orm/mapper.py')
-rw-r--r--test/orm/mapper.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/orm/mapper.py b/test/orm/mapper.py
index 4a816c16c..2c7eab385 100644
--- a/test/orm/mapper.py
+++ b/test/orm/mapper.py
@@ -63,7 +63,15 @@ class MapperTest(MapperSuperTest):
assert False
except exceptions.ArgumentError:
pass
-
+
+ def testcolumnprefix(self):
+ mapper(User, users, column_prefix='_')
+ s = create_session()
+ u = s.get(User, 7)
+ assert u._user_name=='jack'
+ assert u._user_id ==7
+ assert not hasattr(u, 'user_name')
+
def testrefresh(self):
mapper(User, users, properties={'addresses':relation(mapper(Address, addresses))})
s = create_session()