Login | Register
My pages Projects Community openCollabNet

Discussions > users > SQL generation

argouml-db
Discussion topic

Back to topic list

SQL generation

Author Ilia Gaichenia <Zoisite2 at yandex dot ru>
Full name Ilia Gaichenia <Zoisite2 at yandex dot ru>
Date 2008-08-30 13:26:32 PDT
Message Hello,



I have table that references to itself. How can i do this relationship? When I do relationship application generates some like this:



ALTER TABLE my_table

ADD CONSTRAINT my_table_fk1 FOREIGN KEY (my_table_id)

    REFERENCES $fkey.getNativeTabl​eName()($fkey.getNa​tiveColumnName());



But it was better, if it was like this:





ALTER TABLE my_table

ADD CONSTRAINT my_table_fk1 FOREIGN KEY (my_table_id)

    REFERENCES my_table(id);



Thank You,



Ilia

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

SQL generation Ilia Gaichenia <Zoisite2 at yandex dot ru> Ilia Gaichenia <Zoisite2 at yandex dot ru> 2008-08-30 13:26:32 PDT
Messages per page: