if prop is None:
if (self.include_properties is not None and
- column_key not in self.include_properties):
- self.__log("not including property %s" % (column_key))
+ column.key not in self.include_properties):
+ self.__log("not including property %s" % (column.key))
continue
if (self.exclude_properties is not None and
- column_key in self.exclude_properties):
- self.__log("excluding property %s" % (column_key))
+ column.key in self.exclude_properties):
+ self.__log("excluding property %s" % (column.key))
continue
prop = ColumnProperty(column)
v_m = mapper(Vendor, inherits=p_m, polymorphic_identity='vendor',
exclude_properties=('boss_id', 'employee_number'))
h_m = mapper(Hoho, t, include_properties=('id', 'type', 'name'))
- l_m = mapper(Lala, t, exclude_properties=('vendor_id', 'boss_id'))
+ l_m = mapper(Lala, t, exclude_properties=('vendor_id', 'boss_id'),
+ column_prefix="p_")
- for m in p_m, e_m, m_m, v_m, h_m, l_m:
- m.compile()
+ p_m.compile()
def assert_props(cls, want):
have = set([n for n in dir(cls) if not n.startswith('_')])
'id', 'name', 'type'])
assert_props(Vendor, ['vendor_id', 'id', 'name', 'type'])
assert_props(Hoho, ['id', 'name', 'type'])
- assert_props(Lala, ['employee_number', 'id', 'name', 'type'])
+ assert_props(Lala, ['p_employee_number', 'p_id', 'p_name', 'p_type'])
def testrecursiveselectby(self):
"""test that no endless loop occurs when traversing for select_by"""