Sorry, I has a problem with the foreign-key fields.
Pedro Salgado On 19/8/04 4:56 pm, "Pedro Salgado" <[EMAIL PROTECTED]> wrote: > Hi! > > I am using the Xdoclet module to generate my repository-files and SQL. > > I have a 1:many relationship defined in one of my objects that is > correctly mapped on OJB repository and Torque schema. > > The problem happens when I try to insert the SQL on my MySQL database: > > Failed to execute: > > CREATE TABLE t_table ( > > productId INTEGER NOT NULL, > orderId INTEGER NOT NULL, > > PRIMARY KEY(productId,orderId), > FOREIGN KEY (productId) REFERENCES t_products (id) ) > > > java.sql.SQLException: > > Syntax error or access violation, message from server: > > "You have an error in your SQL syntax. Check the manual that corresponds > to your MySQL server version for the right syntax to use near ' PRIMARY > KEY(product" > > > I am using MySQL 4.0.16 > > All help is welcomed. > > Regards, > > Pedro Salgado > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
