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

add some comments, FIXME, etc...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 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