Show
Ignore:
Timestamp:
12/04/08 17:11:53 (3 years ago)
Author:
ged
Message:

delete Elixir properties as late as possible (ie in setup phase), not right
after they are added. It makes for a less confusing behavior.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • elixir/trunk/elixir/properties.py

    r383 r422  
    127127        entity._descriptor.builders.append(self) 
    128128 
    129         # delete the original attribute so that it doesn't interfere with 
    130         # SQLAlchemy. Note that getattr and delattr are not symmetrical: 
    131         # getattr look up in parent classes, while delattr must be called on 
    132         # the exact class holding the attribute. 
    133         if name in entity.__dict__: 
    134             delattr(entity, name) 
    135  
    136129    def __repr__(self): 
    137130        return "Property(%s, %s)" % (self.name, self.entity)