Changeset 319
- Timestamp:
- 04/03/08 10:12:30 (5 years ago)
- Location:
- elixir/trunk
- Files:
-
- 4 modified
-
CHANGES (modified) (1 diff)
-
elixir/relationships.py (modified) (1 diff)
-
tests/test_m2o.py (modified) (1 diff)
-
tests/test_through.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/CHANGES
r318 r319 3 3 Bug fixes: 4 4 - Fixed multi-table inheritance when using a non default schema (closes #38) 5 - Fixed ManyToOne relationships using 'key' kwarg in their column_kwargs 6 (patch by Jason R. Coombs) 5 7 6 8 0.5.2 - 2008-03-28 -
elixir/trunk/elixir/relationships.py
r307 r319 572 572 573 573 # store the names of those columns 574 fk_colnames.append(col name)574 fk_colnames.append(col.key) 575 575 576 576 # build the list of column "paths" the foreign key will -
elixir/trunk/tests/test_m2o.py
r273 r319 51 51 52 52 assert b.a.testx == 1 53 54 def test_wh_key_in_m2o_col_kwargs(self): 55 class A(Entity): 56 name = Field(String(128), default="foo") 57 58 class B(Entity): 59 # specify a different key for the column so that 60 # it doesn't override the property when the column 61 # gets created. 62 a = ManyToOne('A', colname='a', 63 column_kwargs=dict(key='a_id')) 64 65 setup_all(True) 66 67 assert A.table.primary_key.columns.has_key('id') 68 assert B.table.columns.has_key('a_id') 69 70 a = A() 71 session.flush() 72 b = B(a=a) 73 session.flush() 74 session.clear() 75 76 assert B.query.first().a == A.query.first() 53 77 54 78 def test_one_pk(self): -
elixir/trunk/tests/test_through.py
r226 r319 1 1 """ 2 simple test case2 test has_*(..., through=...) syntax 3 3 """ 4 4 … … 12 12 class TestThrough(object): 13 13 def teardown(self): 14 cleanup_all( )14 cleanup_all(True) 15 15 16 16 def test_rel_through(self):
