Hi,
I am using JBoss and mySQL and I had a similar problem. I think the
reason is that with Jboss relation fields MUST not be declared as CMP
fields. If you do so, JBoss will generate the column twice, thus the
duplication error.

Aslak introduced an attribute called "fkcmp" in the cmp20 task. Set this
to false and it should work.

Leander

Am Don, 2002-07-11 um 14.47 schrieb Eric Lacroix:
> Le jeu 11/07/2002 � 11:53, Aslak Helles�y a �crit :
> > Well, the PostgreSQL driver has been buggy, but I have managed to get a
> > working one from the author, Chris Shaw. It's in CVS.
> > Try again with that driver, and everything should be OK.
> 
> Yeah, thanks, it seems to work. The deployment is OK. We'll have to test
> the EJB now.
> It still remains a problem : when the tables are not created before the
> deployment, when deploying the .jar, this error appens :
> org.jboss.deployment.DeploymentException: Error while creating table; -
> nested throwable: (java.sql.SQLException: ERROR:  CREATE TABLE:
> attribute "fk_gen_id" duplicated
> 
> Regards,
> Eric.
> 
> Here's the definition of the original tables (for testing) :
> CREATE TABLE "gen" (
> "id" int4 NOT NULL,
> "nom" text NOT NULL ,
> PRIMARY KEY ("id"), UNIQUE ("id"));
> CREATE INDEX "gen_id_key" ON "gen"("id");
> 
> CREATE TABLE "adresse" (
> "id" int4 NOT NULL,
> "rue" text NOT NULL ,
> PRIMARY KEY ("id"), UNIQUE ("id"));
> CREATE INDEX "adresse_id_key" ON "adresse"("id"); 
> 
> 
> CREATE TABLE "genadresse" (
> "id" int4 NOT NULL,
> "fk_gen_id" int4 REFERENCES "gen"("id") ,
> "fk_adresse_id" int4 REFERENCES "adresse"("id") ,
> PRIMARY KEY ("id"), UNIQUE ("id"));
> CREATE INDEX "genadresse_id_key" ON "genadresse"("id");
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> PC Mods, Computing goodies, cases & more
> http://thinkgeek.com/sf
> _______________________________________________
> middlegen-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
-- 
M.-Leander Reimer
Dipl.-Inf. (FH)

Techdivision
Kunstm�hlstr. 17
83022 Rosenheim

Fon:    (08031) 356 38 32
Fax:    (08031) 356 38 48 
Mail:   [EMAIL PROTECTED]



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
PC Mods, Computing goodies, cases & more
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to