On Jul 14, 2006, at 2:21 PM, David Shoemaker wrote:

>
> This is actually somewhat unrelated, but how are circular foreign  
> key dependencies handled?  In the example above, what if table lala  
> had to be created after table foo because of such a dependency?   
> While you're refactoring this code, it might be worth it to process  
> the constraints separately ( i.e. not linked to table creation), so  
> the syntax would be:
>
> ...
> CREATE TABLE foo (
>    id INTEGER SERIAL,
>    foo_id INTEGER,
> )
> ...
> ALTER TABLE foo
>    ADD PRIMARY KEY(id),
>    ADD FOREIGN KEY(foo_id) REFERENCES lala (foo_id)
>
> Just a thought.
>

yeah yeah i know....this refactoring isnt going to allow that  
directly just yet but it will make it easier, as there will be  
explicit constraint objects.



-------------------------------------------------------------------------
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