Changeset 510
- Timestamp:
- 11/09/09 12:56:31 (4 years ago)
- Location:
- elixir/trunk
- Files:
-
- 3 modified
-
CHANGES (modified) (1 diff)
-
elixir/entity.py (modified) (2 diffs)
-
tests/test_custombase.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
elixir/trunk/CHANGES
r505 r510 12 12 - Fixed custom base classes and versioned extension when used with zope 13 13 interfaces (closes #98, patch from Valentin Lab) 14 - Fixed having relationships in custom base classes (based on patch 15 by Stéphane Klein) 14 16 15 17 0.7.0 - 2009-10-01 -
elixir/trunk/elixir/entity.py
r509 r510 8 8 import warnings 9 9 10 from copy import copy10 from copy import deepcopy 11 11 12 12 import sqlalchemy … … 718 718 base_props = getmembers(entity_base, 719 719 lambda a: isinstance(a, Property)) 720 base_props = [(name, copy(attr)) for name, attr in base_props]720 base_props = [(name, deepcopy(attr)) for name, attr in base_props] 721 721 else: 722 722 base_props = [] -
elixir/trunk/tests/test_custombase.py
r505 r510 116 116 assert 'common' in B.table.columns 117 117 118 def test_base_with_relation(self): 119 class FieldBase(object): 120 __metaclass__ = EntityMeta 121 122 common = ManyToOne('A') 123 124 class A(FieldBase): 125 name = Field(String(32)) 126 127 class B(FieldBase): 128 pass 129 130 setup_all(True) 131 132 assert 'name' in A.table.columns 133 assert 'common_id' in A.table.columns 134 assert 'common_id' in B.table.columns 135 118 136 def test_base_with_fields_in_parent(self): 119 137 class BaseParent(object):
