After investigating further, i have the impression that the problem occurs when models are in different modules (notes.py & users.py in this case) but if the models are in the same module eg. myapp.models.__init__.py, the tables are created.
I'd still like to know why this is happening because i don't intend to put al my models in the same module..
Thanks,
One solution is to import all the sub-modules in your bootstrap.py
before calling create_all. Another is importing the submodules inside
the myapp/models/__init__.py
Hope that helps,
Simon
-----Original Message-----
From: sqlal...@googlegroups.com [mailto:sqlal...@googlegroups.com]
On Behalf Of eric cire
Sent: 30 March 2011 14:57
To: sqlalchemy
Subject: [sqlalchemy] Re: sqlalchemy.exc.NoReferencedTableError: Could
not find table with which to generate a foreign key
After investigating further, i have the impression that the problem
occurs when models are in different modules (notes.py & users.py in this
case) but if the models are in the same module eg.
myapp.models.__init__.py, the tables are created.
I'd still like to know why this is happening because i don't intend to
put al my models in the same module..
Thanks,
On Wed, Mar 30, 2011 at 3:36 PM, 371c <371c...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google
Groups "sqlalchemy" group.
To post to this group, send email to sqlal...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.
Cheers,