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