Closed GoogleCodeExporter closed 9 years ago
that is not what I see (and the test confirms). if what you were saying in the
case
then we would see _foo in the .fields.
If you have a case where it does break please include it.
class Synonym(Base):
__tablename__ = 'synonyms'
id = Column(Integer, primary_key=True)
_foo = Column(Text, nullable=True)
def _set_foo(self, foo):
self._foo = "SOMEFOO " + foo
def _get_foo(self):
return self._foo
foo = synonym('_foo', descriptor=property(_get_foo, _set_foo))
>>> fs_s = FieldSet(Synonym)
>>> fs_s._fields
{'foo': AttributeField(foo), 'id': AttributeField(id)}
Original comment by jbel...@gmail.com
on 31 Mar 2009 at 3:26
guess I should be more specific,
self.field.name still includes the old non-decorated field value (if there
isn't any
second storage for the field name), it would be useful to use synonym also
internally. It would make customizing FA easier.
Original comment by iElect...@gmail.com
on 31 Mar 2009 at 9:21
Original issue reported on code.google.com by
iElect...@gmail.com
on 30 Mar 2009 at 6:45