Show
Ignore:
Timestamp:
08/01/07 01:58:31 (7 years ago)
Author:
cleverdevil
Message:

Added a method to EntityDescriptor for adding mapper extensions. Updated the events code to use it.

Files:
1 modified

Legend:

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

    r164 r169  
    192192        else: 
    193193            self.delayed_properties[name] = prop 
    194  
     194     
     195    def add_mapper_extension(self, extension): 
     196        extensions = self.mapper_options.get('extension', []) 
     197        if not isinstance(extensions, list): 
     198            extensions = [extensions] 
     199        extensions.append(extension) 
     200        self.mapper_options['extension'] = extensions 
     201     
    195202    def setup_table(self): 
    196203        '''