Ticket #21: elixir.patch

File elixir.patch, 1.5 kB (added by guest, 6 years ago)
  • elixir/options.py

     
    157157    table_options=dict(), 
    158158) 
    159159 
     160colname_format = '%s_%s' 
     161 
    160162valid_options = options_defaults.keys() + [ 
    161163    'metadata', 
    162164    'session', 
  • elixir/entity.py

     
    839839        return cls.query.get(*args, **kwargs) 
    840840    get = classmethod(get) 
    841841 
     842    def set(self, **kw): 
     843        for k in kw: 
     844            setattr(self, k, kw[k]) 
     845 
    842846    #-----------------# 
    843847    # DEPRECATED LAND # 
    844848    #-----------------# 
  • elixir/relationships.py

     
    329329from sqlalchemy.ext.associationproxy import association_proxy 
    330330 
    331331import sys 
     332import options 
    332333 
    333334__doc_all__ = [] 
    334335 
     
    545546                if self.colname: 
    546547                    colname = self.colname[key_num] 
    547548                else: 
    548                     colname = '%s_%s' % (self.name, pk_col.key) 
     549                    colname = options.colname_format % (self.name, pk_col.key) 
    549550 
    550551                # we can't add the column to the table directly as the table 
    551552                # might not be created yet.