Changeset 531

Show
Ignore:
Timestamp:
09/02/10 12:07:44 (21 months ago)
Author:
ged
Message:

add some comments, FIXME, etc...

Location:
elixir/trunk/elixir
Files:
2 modified

Legend:

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

    r521 r531  
    364364        order = [] 
    365365        for colname in order_by: 
     366            #FIXME: get_column uses self.columns[key] instead of property 
     367            # names. self.columns correspond to the columns of the table if 
     368            # the table was already created and to self._columns otherwise, 
     369            # which is a ColumnCollection indexed on columns.key 
     370            # See ticket #108. 
    366371            col = self.get_column(colname.strip('-')) 
    367372            if colname.startswith('-'): 
     
    487492            else: 
    488493                del self._columns[col.key] 
     494        # are indexed on col.key 
    489495        self._columns.add(col) 
    490496 
     
    643649                if isinstance(prop, ColumnProperty): 
    644650                    for col in prop.columns: 
     651                        #XXX: Why is this extra loop necessary? What is this 
     652                        #     "proxy_set" supposed to mean? 
    645653                        for col in col.proxy_set: 
    646654                            col_to_prop[col] = prop 
  • elixir/trunk/elixir/relationships.py

    r522 r531  
    629629        if isinstance(self.target, EntityMeta): 
    630630            # make sure the target has all its pk set up 
     631            #FIXME: this is not enough when specifying target_column manually, 
     632            # on unique, non-pk col, see tests/test_m2o.py:test_non_pk_forward 
    631633            self.target._descriptor.create_pk_cols() 
     634 
    632635        #XXX: another option, instead of the FakeTable, would be to create an 
    633636        # EntityDescriptor for the SA class. 
     
    650653                            "'%s' using the following columns: %s." 
    651654                            % (self.entity.table.name, colnames)) 
     655            else: 
     656                # in this case we let SA handle everything.  
     657                # XXX: we might want to try to build join clauses anyway so  
     658                # that we know whether there is an ambiguity or not, and 
     659                # suggest using colname if there is one 
     660                pass 
    652661            if self.field: 
    653662                raise NotImplementedError( 
     
    803812        # (ManyToOne). 
    804813        if self.entity.table is self.target.table: 
    805             #FIXME: IF this code is of any use, it will probably break for 
    806             # autoloaded tables 
     814            # When using a manual/autoloaded table, it will be assigned 
     815            # an empty list, which doesn't seem to upset SQLAlchemy 
    807816            kwargs['remote_side'] = self.inverse.foreign_key 
    808817