Changeset 531
- Timestamp:
- 09/02/10 12:07:44 (21 months ago)
- Location:
- elixir/trunk/elixir
- Files:
-
- 2 modified
-
entity.py (modified) (3 diffs)
-
relationships.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/elixir/entity.py
r521 r531 364 364 order = [] 365 365 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. 366 371 col = self.get_column(colname.strip('-')) 367 372 if colname.startswith('-'): … … 487 492 else: 488 493 del self._columns[col.key] 494 # are indexed on col.key 489 495 self._columns.add(col) 490 496 … … 643 649 if isinstance(prop, ColumnProperty): 644 650 for col in prop.columns: 651 #XXX: Why is this extra loop necessary? What is this 652 # "proxy_set" supposed to mean? 645 653 for col in col.proxy_set: 646 654 col_to_prop[col] = prop -
elixir/trunk/elixir/relationships.py
r522 r531 629 629 if isinstance(self.target, EntityMeta): 630 630 # 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 631 633 self.target._descriptor.create_pk_cols() 634 632 635 #XXX: another option, instead of the FakeTable, would be to create an 633 636 # EntityDescriptor for the SA class. … … 650 653 "'%s' using the following columns: %s." 651 654 % (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 652 661 if self.field: 653 662 raise NotImplementedError( … … 803 812 # (ManyToOne). 804 813 if self.entity.table is self.target.table: 805 # FIXME: IF this code is of any use, it will probably break for806 # a utoloaded tables814 # When using a manual/autoloaded table, it will be assigned 815 # an empty list, which doesn't seem to upset SQLAlchemy 807 816 kwargs['remote_side'] = self.inverse.foreign_key 808 817
