Discussion:
[Middlegen-user] Duplicate columns generated with foreign ke y relationships
Meyer-Willner, Bernhard
2002-11-14 15:39:06 UTC
Permalink
What I can tell you is that JBoss currently doesn't allow one field/column
to be a CMP and a CMR field at the same time.

Cheers,
Bernie

-----Ursprüngliche Nachricht-----
Von: Thompson, Darryl [mailto:***@allegiancetelecom.com]
Gesendet: Donnerstag, 14. November 2002 18:31
An: middlegen-***@lists.sourceforge.net
Betreff: [Middlegen-user] Duplicate columns generated with foreign key
relationships



Hello,
I am using Middlegen with Oracle8 and jdk 1.4.1 EJB 2.0 CMP/CMR with
JBoss 3.0.4. When attempting to create a new entity that has oracle foreign
key columns embedded in it I get a JDBC exception stating that there are
duplicate columns present. I turned on the Log4j debugger and discovered
that for every foreign key present in the o/r mapping I have two columns
with the same name. It seems that there is one entry for the foreign key
relationship and one for the actual field being mapped (if I said that
right). Below is the run-time generated sql from the jboss/log4j debug
statement, does anyone know what should be done to correct this issue? I
could not find a match in the middlegen archive, is this a new issue?

Thanks,
Darryl


INSERT INTO
COEADMIN.SALESORDER (ORDERID,
SERVICELOCATIONID,
ORDERSTATUSID,
CONTRACTDATE,
PROCESSDATE,
SALESREPID,
SALESTEAMID,
WAVEINSTALLFEE,
ICBNUMBER,
SERVICELOCATIONID,
ORDERSTATUSID,
SALESTEAMID,
SALESREPID) VALUES (?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
middlegen-user mailing list
middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Eivind Waaler
2002-11-14 16:41:04 UTC
Permalink
Have you tried using the fkcmp attribute in the cmp20 plugin? Look here
for documentation:

http://boss.bekk.no/boss/middlegen/plugins/cmp20.html

=2Eeivind
What I can tell you is that JBoss currently doesn't allow one field/colum=
n
to be a CMP and a CMR field at the same time.
=20
Cheers,
Bernie
=20
-----Urspr=FCngliche Nachricht-----
Gesendet: Donnerstag, 14. November 2002 18:31
Betreff: [Middlegen-user] Duplicate columns generated with foreign key
relationships
=20
=20
=20
Hello,
I am using Middlegen with Oracle8 and jdk 1.4.1 EJB 2.0 CMP/CMR with
JBoss 3.0.4. When attempting to create a new entity that has oracle forei=
gn
key columns embedded in it I get a JDBC exception stating that there are
duplicate columns present. I turned on the Log4j debugger and discovered
that for every foreign key present in the o/r mapping I have two columns
with the same name. It seems that there is one entry for the foreign key
relationship and one for the actual field being mapped (if I said that
right). Below is the run-time generated sql from the jboss/log4j debug
statement, does anyone know what should be done to correct this issue? I
could not find a match in the middlegen archive, is this a new issue?
=20
Thanks,=20
Darryl
=20
=20
INSERT INTO
COEADMIN.SALESORDER (ORDERID,
SERVICELOCATIONID,=
=20
ORDERSTATUSID,=20
CONTRACTDATE,=20
PROCESSDATE,=20
SALESREPID,=20
SALESTEAMID,=20
WAVEINSTALLFEE,=20
ICBNUMBER,=20
SERVICELOCATIONID,=
=20
ORDERSTATUSID,=20
SALESTEAMID,=20
SALESREPID) VALUES =
(?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
=20
=20
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing=20
your web site with SSL, click here to get a FREE TRIAL of a Thawte=20
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
=20
This e-mail and any attachment is for authorised use by the intended reci=
pient(s) only. It may contain proprietary material, confidential informati=
on and/or be subject to legal privilege. It should not be copied, disclose=
d to, retained or used by, any other party. If you are not an intended rec=
ipient then please promptly delete this e-mail and any attachment and all c=
opies and inform the sender. Thank you.
=20
=20
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
=20
Pierre CARION
2002-11-14 17:47:01 UTC
Permalink
I had the same problem in my project :

Just set the attribute fkcmp="false" in your cmp20 plugin and
you will get rind of the duupliacte column error
Post by Eivind Waaler
Have you tried using the fkcmp attribute in the cmp20 plugin? Look
here
http://boss.bekk.no/boss/middlegen/plugins/cmp20.html
.eivind
Post by Meyer-Willner, Bernhard
What I can tell you is that JBoss currently doesn't allow one
field/column
Post by Meyer-Willner, Bernhard
to be a CMP and a CMR field at the same time.
Cheers,
Bernie
-----Urspr�ngliche Nachricht-----
Von: Thompson, Darryl
Gesendet: Donnerstag, 14. November 2002 18:31
Betreff: [Middlegen-user] Duplicate columns generated with foreign
key
Post by Meyer-Willner, Bernhard
relationships
Hello,
I am using Middlegen with Oracle8 and jdk 1.4.1 EJB 2.0 CMP/CMR
with
Post by Meyer-Willner, Bernhard
JBoss 3.0.4. When attempting to create a new entity that has oracle
foreign
Post by Meyer-Willner, Bernhard
key columns embedded in it I get a JDBC exception stating that
there are
Post by Meyer-Willner, Bernhard
duplicate columns present. I turned on the Log4j debugger and
discovered
Post by Meyer-Willner, Bernhard
that for every foreign key present in the o/r mapping I have two
columns
Post by Meyer-Willner, Bernhard
with the same name. It seems that there is one entry for the
foreign key
Post by Meyer-Willner, Bernhard
relationship and one for the actual field being mapped (if I said
that
Post by Meyer-Willner, Bernhard
right). Below is the run-time generated sql from the jboss/log4j
debug
Post by Meyer-Willner, Bernhard
statement, does anyone know what should be done to correct this
issue? I
Post by Meyer-Willner, Bernhard
could not find a match in the middlegen archive, is this a new
issue?
Post by Meyer-Willner, Bernhard
Thanks,
Darryl
INSERT INTO
COEADMIN.SALESORDER (ORDERID,
SERVICELOCATIONID,
Post by Meyer-Willner, Bernhard
ORDERSTATUSID,
CONTRACTDATE,
PROCESSDATE,
SALESREPID,
SALESTEAMID,
WAVEINSTALLFEE,
Post by Meyer-Willner, Bernhard
ICBNUMBER,
SERVICELOCATIONID,
ORDERSTATUSID,
Post by Meyer-Willner, Bernhard
SALESTEAMID,
SALESREPID)
VALUES (?,
Post by Meyer-Willner, Bernhard
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
This e-mail and any attachment is for authorised use by the
intended recipient(s) only. It may contain proprietary material,
confidential information and/or be subject to legal privilege. It
should not be copied, disclosed to, retained or used by, any other
party. If you are not an intended recipient then please promptly
delete this e-mail and any attachment and all copies and inform the
sender. Thank you.
Post by Meyer-Willner, Bernhard
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
Darryl Thompson
2002-11-15 04:22:09 UTC
Permalink
Thanks guys I will make the recommended change.

Regards,
Darryl
Post by Pierre CARION
Just set the attribute fkcmp="false" in your cmp20
plugin and
you will get rind of the duupliacte column error
Post by Eivind Waaler
Have you tried using the fkcmp attribute in the
cmp20 plugin? Look
Post by Eivind Waaler
here
http://boss.bekk.no/boss/middlegen/plugins/cmp20.html
Post by Pierre CARION
Post by Eivind Waaler
.eivind
On Thu, 14 Nov 2002, Meyer-Willner, Bernhard
Post by Meyer-Willner, Bernhard
What I can tell you is that JBoss currently
doesn't allow one
Post by Eivind Waaler
field/column
Post by Meyer-Willner, Bernhard
to be a CMP and a CMR field at the same time.
Cheers,
Bernie
-----Urspr�ngliche Nachricht-----
Von: Thompson, Darryl
Gesendet: Donnerstag, 14. November 2002 18:31
Betreff: [Middlegen-user] Duplicate columns
generated with foreign
Post by Eivind Waaler
key
Post by Meyer-Willner, Bernhard
relationships
Hello,
I am using Middlegen with Oracle8 and jdk
1.4.1 EJB 2.0 CMP/CMR
Post by Eivind Waaler
with
Post by Meyer-Willner, Bernhard
JBoss 3.0.4. When attempting to create a new
entity that has oracle
Post by Eivind Waaler
foreign
Post by Meyer-Willner, Bernhard
key columns embedded in it I get a JDBC
exception stating that
Post by Eivind Waaler
there are
Post by Meyer-Willner, Bernhard
duplicate columns present. I turned on the Log4j
debugger and
Post by Eivind Waaler
discovered
Post by Meyer-Willner, Bernhard
that for every foreign key present in the o/r
mapping I have two
Post by Eivind Waaler
columns
Post by Meyer-Willner, Bernhard
with the same name. It seems that there is one
entry for the
Post by Eivind Waaler
foreign key
Post by Meyer-Willner, Bernhard
relationship and one for the actual field being
mapped (if I said
Post by Eivind Waaler
that
Post by Meyer-Willner, Bernhard
right). Below is the run-time generated sql
from the jboss/log4j
Post by Eivind Waaler
debug
Post by Meyer-Willner, Bernhard
statement, does anyone know what should be done
to correct this
Post by Eivind Waaler
issue? I
Post by Meyer-Willner, Bernhard
could not find a match in the middlegen archive,
is this a new
Post by Eivind Waaler
issue?
Post by Meyer-Willner, Bernhard
Thanks,
Darryl
INSERT INTO
COEADMIN.SALESORDER (ORDERID,
SERVICELOCATIONID,
ORDERSTATUSID,
CONTRACTDATE,
PROCESSDATE,
SALESREPID,
SALESTEAMID,
Post by Eivind Waaler
WAVEINSTALLFEE,
ICBNUMBER,
Post by Eivind Waaler
SERVICELOCATIONID,
ORDERSTATUSID,
SALESTEAMID,
SALESREPID)
Post by Eivind Waaler
VALUES (?,
Post by Meyer-Willner, Bernhard
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-------------------------------------------------------
Post by Pierre CARION
Post by Eivind Waaler
Post by Meyer-Willner, Bernhard
This sf.net email is sponsored by: To learn the
basics of securing
Post by Eivind Waaler
Post by Meyer-Willner, Bernhard
your web site with SSL, click here to get a FREE
TRIAL of a Thawte
http://www.gothawte.com/rd524.html
Post by Eivind Waaler
Post by Meyer-Willner, Bernhard
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Pierre CARION
Post by Eivind Waaler
Post by Meyer-Willner, Bernhard
This e-mail and any attachment is for authorised
use by the
Post by Eivind Waaler
intended recipient(s) only. It may contain
proprietary material,
Post by Eivind Waaler
confidential information and/or be subject to
legal privilege. It
Post by Eivind Waaler
should not be copied, disclosed to, retained or
used by, any other
Post by Eivind Waaler
party. If you are not an intended recipient then
please promptly
Post by Eivind Waaler
delete this e-mail and any attachment and all
copies and inform the
Post by Eivind Waaler
sender. Thank you.
-------------------------------------------------------
Post by Pierre CARION
Post by Eivind Waaler
Post by Meyer-Willner, Bernhard
This sf.net email is sponsored by: To learn the
basics of securing
Post by Eivind Waaler
Post by Meyer-Willner, Bernhard
your web site with SSL, click here to get a FREE
TRIAL of a Thawte
http://www.gothawte.com/rd524.html
Post by Eivind Waaler
Post by Meyer-Willner, Bernhard
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Pierre CARION
Post by Eivind Waaler
This sf.net email is sponsored by: To learn the
basics of securing
Post by Eivind Waaler
your web site with SSL, click here to get a FREE
TRIAL of a Thawte
http://www.gothawte.com/rd524.html
Post by Eivind Waaler
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Pierre CARION
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
-------------------------------------------------------
Post by Pierre CARION
This sf.net email is sponsored by: To learn the
basics of securing
your web site with SSL, click here to get a FREE
TRIAL of a Thawte
http://www.gothawte.com/rd524.html
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

Loading...