As you wrote the problem is simple that ojbxdoclet generates wrong schema-files.
I donīt know any automatism to bring the schema files in the right order and solve depedencies.



If there are only a few tables you can sort them manually in the schema-file or in the sql-insert script.
run first create-sql, sort them, run insert-sql.
But itīs an really bad way :(





Smith James E A1C 805 CSPTS/SCE schrieb:

When I try to rebuild my database from my generated sql files I receive
this error on tables that contain foreign keys in tables after it.



torque:insert-sql:

   [torque-sql-exec] Executing file: D:\...\target\sql\...-schema.sql

   [torque-sql-exec] [ERROR] Failed to execute: CREATE TABLE
COMMENT....

   [torque-sql-exec] [ERROR] java.sql.SQLException: General error,
message from server: "Can't create table '.\...\comment.frm' (errno:
150)"

.....

   [torque-sql-exec] [ERROR] Failed to execute: CREATE TABLE USER....

   [torque-sql-exec] [ERROR] java.sql.SQLException: General error,
message from server: "Can't create table '.\...\user.frm' (errno: 150)"

.....



The problem is, COMMENT has a foreign key in USER.  So this is an
ordering problem in the generated sql file, which is generated from the
torque schema file.  I don't generate the torque schema manually though,
so I don't have a chance to put it in order.  The torque schema is
generated by ojbxdoclet and is put in alphabetical order (since that is
the order it parses the java files).  Is there anything I can do to
avoid this problem?  I doubt I'm the first person to run into this.



James E Smith

805 CSPTS / SCBE

256 - 4336








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to