unfortunately, the issue of a circular ForeignKey relationship  
between two tables has not been resolved cleanly right now.  You will  
have to leave the ForeignKey constraint off of one Table when you do  
the create, and then manually create the second foreign key afterwards.

you can then probably tack on the ForeignKey to its Column using  
table.c.somecol.append_item(ForeignKey('foo'))


On Aug 9, 2006, at 9:13 AM, Lars Heuer wrote:

> Hi all,
>
> I've a circular reference between two tables (via ForeignKey).
> The circular references make
>
>     metadata.create_all()
>
> fail (SQLAlchemy 0.2.4).
> Is there a work around that I can use tables with circular references
> _and_ metadata.create_all()?
>
> Best regards,
> Lars
> -- 
> http://www.semagia.com
>
>
> ---------------------------------------------------------------------- 
> ---
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Sqlalchemy-users mailing list
> Sqlalchemy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to