Changeset 267 for elixir/trunk/elixir/entity.py
- Timestamp:
- 11/14/07 10:57:14 (6 years ago)
- Files:
-
- 1 modified
-
elixir/trunk/elixir/entity.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/elixir/entity.py
r265 r267 33 33 # Not on sqlalchemy version 0.4 34 34 ScopedSession = type(None) 35 35 36 36 37 def _do_mapping(session, cls, *args, **kwargs): 37 38 if session is None: … … 51 52 def __getattr__(s, key): 52 53 return getattr(session.registry().query(cls), key) 54 53 55 def __call__(s): 54 56 return session.registry().query(cls) … … 252 254 return 253 255 elif self.inheritance == 'concrete': 254 # copy all columns from parent table255 for col in self.parent._descriptor.columns:256 # copy all columns from parent table 257 for col in self.parent._descriptor.columns: 256 258 self.add_column(col.copy()) 257 #FIXME: copy constraints. But those are not as simple to copy258 #since the source column must be changed259 #FIXME: copy constraints. But those are not as simple to copy 260 #since the source column must be changed 259 261 260 262 if self.polymorphic and self.inheritance in ('single', 'multi') and \ … … 524 526 525 527 def columns(self): 526 #FIXME: this would be more correct but it breaks inheritance, so I'll use the527 # old test for now.528 #FIXME: this would be more correct but it breaks inheritance, so I'll 529 # use the old test for now. 528 530 # if self.entity.table: 529 531 if self.autoload: … … 567 569 return "<TriggerProxy (%s)>" % (self.class_.__name__) 568 570 571 569 572 class TriggerAttribute(object): 573 570 574 def __init__(self, attrname): 571 575 self.attrname = attrname … … 581 585 def _is_entity(class_): 582 586 return isinstance(class_, EntityMeta) 587 583 588 584 589 class EntityMeta(type): … … 733 738 method() 734 739 740 735 741 def cleanup_entities(entities): 736 742 """
