Hi,
I am creating a bunch of columns by means of the declared_attr decorator since
many of them contain foreign keys. Similar to the issue in this thread [1] from
a year ago, it seems that the column order is not preserved. To shamelessly
borrow the example from that thread, when doing:
class Foo(object):
@declared_attr
def id(self):
return Column(Integer, primary_key=True)
@declared_attr
def foo(self):
return Column(Integer, nullable=True)
class Bar(Base, object):
__tablename__ = 'bar'
then the order of 'foo' and 'id' appears to be random. Is there a way around
this?
FWIW, I'm using SQLAlchemy 0.7.1 on Python 3.2, using SQLite as the backend.
Thanks,
Hans-Martin
[1]
http://groups.google.com/group/sqlalchemy/browse_thread/thread/0c8aa608c8dd4d7a
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.