I have a py file that creates my tables.  It does MetaData =
queue.metadata.  metadata.create_all().  That's all I do with MetaData.  Is
there additional table setup I need to be doing?

On Tue, Dec 23, 2008 at 12:24 PM, Michael Bayer <mike...@zzzcomputing.com>wrote:

> thats because both Table objects need to be present in the MetaData when
> used.   Ultimately your application can't run unless both "queue" and
> "filequeue" have been imported in some way.
>
>
> On Dec 23, 2008, at 1:21 PM, Michael Mileusnich wrote:
>
> I am not sure based on the project if I can have a module that imports both
> of them.  How can I use the string based ForeignKey?  I may be doing it in
> correctly because it says the table does not exist that I try to reference.
>
> On Tue, Dec 23, 2008 at 12:18 PM, Michael Bayer 
> <mike...@zzzcomputing.com>wrote:
>
>>
>> ForeignKey accepts strings to remove the inconvenience of handling
>> circular imports.   Both dependent tables will need to be present
>> within the shared MetaData object at the point at which the Table
>> object is first used, though, so another module that imports both
>> queue and filequeue would be best.
>>
>> On Dec 23, 2008, at 10:48 AM, justmike2...@gmail.com wrote:
>>
>> >
>> > Over the last couple days I have been having an issue with relations/
>> > imports.  I have a class called queue where I define all my columns.
>> > Within queue I have a function that references a class filequeue so I
>> > need to 'from filequeues import filequeue'.  The queue class itself
>> > has relations with other classes/tables.  My problem is that within
>> > filequeue, I need to 'from queues import queue' in order to ForeignKey
>> > (queue.queueid).  Well now queue imports filequeue and filequeue
>> > imports queue causing an issue.  I tried to ForeignKey
>> > ('QUEUES.queueid') but SQLAlch says it cannot find the tables.
>> >
>> > Any ideas?
>> >
>> > >
>>
>>
>>
>>
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to