Discussion:
[Middlegen-user] Issue with creating EJB with relationships through the SessionFacade
Dylan Etkin
2003-06-17 12:30:10 UTC
Permalink
Hi,
Not sure if this goes to devel or user. I am trying to modify the adapter plugin to use the Session facade + the VO's. When trying to create a Reservation I am getting a SQL exception stating that either person_id_fk or flight_id_fk is specified more than once. After a bit of debuging this is true. The CMP generated this SQL:
INSERT INTO reservations (reservation_id, person_id_fk, flight_id_fk, registration_utc, comment, person_id_fk, flight_id_fk) VALUES (?, ?, ?, ?, ?, ?, ?)

At first glance I do not see what in the objects is wrong. The only thing I can think is that since the entity bean has both a Person and personIdFk the container thinks their should be both.

Have you seen this and do you have ideas on a fix?

Thanks,
Dylan
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.
Eivind Waaler
2003-06-17 13:14:15 UTC
Permalink
Hmm, remember seeing this once before. I think it's got to do with JBoss
not being too happy about foreign keys being part of the primary key or
something like that.

This is fixed in the latest JBoss versions. I'm using version 3.2.1 now,
which seems to work fine.

Try upgrading your JBoss, or try with the fkcmp flag:
http://boss.bekk.no/boss/middlegen/plugins/cmp20.html#fkcmp

Regards
.eivind
Post by Dylan Etkin
Hi,
INSERT INTO reservations (reservation_id, person_id_fk, flight_id_fk, registration_utc, comment, person_id_fk, flight_id_fk) VALUES (?, ?, ?, ?, ?, ?, ?)
At first glance I do not see what in the objects is wrong. The only thing I can think is that since the entity bean has both a Person and personIdFk the container thinks their should be both.
Have you seen this and do you have ideas on a fix?
Thanks,
Dylan
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...