This might be a stupid problem, but I ran into it so early that I thought I'd post it.
I have a class A that has a foreignkey to class B, but sqlobject-admin (list/create) picks them up in the wrong order (A then B), which causes an error in sqlobject-admin create because A has a foreignkey to B which doesn't exist yet.
class A(SQLObject):
b=ForeignKey('B')
class B(SQLObject):
somedata=StringCol()
If i create the tables manually, I have a similar problem trying to drop where it tries to drop B first.
I've tried using both -m and -p having tables in one module or in different modules in a package. The only thing I've found that changes the order is changing the class names: A<->B. How do I make it get the order right?
- [SQLObject] Creation order with sqlobject-admin Mike Lin
- Re: [SQLObject] Creation order with sqlobject-admin BJörn Lindqvist
- Re: [SQLObject] Creation order with sqlobject-admin Mike Lin
