Changeset 433 for elixir/trunk/elixir
- Timestamp:
- 12/17/08 16:01:02 (3 years ago)
- Files:
-
- 1 modified
-
elixir/trunk/elixir/entity.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/elixir/entity.py
r432 r433 44 44 self.module = sys.modules.get(entity.__module__) 45 45 46 # used for multi-table inheritance 47 self.join_condition = None 46 48 self.has_pk = False 47 49 self._pk_col_done = False … … 175 177 parent_desc = self.parent._descriptor 176 178 tablename = parent_desc.table_fullname 179 join_clauses = [] 177 180 for pk_col in parent_desc.primary_keys: 178 181 colname = options.MULTIINHERITANCECOL_NAMEFORMAT % \ … … 188 191 primary_key=True) 189 192 self.add_column(col) 193 join_clauses.append(col == pk_col) 194 self.join_condition = and_(*join_clauses) 190 195 elif self.inheritance == 'concrete': 191 196 # Copy primary key columns from the parent. … … 379 384 # non-polymorphic concrete doesn't need this 380 385 kwargs['inherits'] = self.parent.mapper 386 387 if self.inheritance == 'multi' and self.parent: 388 kwargs['inherit_condition'] = self.join_condition 381 389 382 390 if self.polymorphic:
