Discussion:
[Middlegen-user] In reservation entity FKs repeated two times in insert query
Scott Walters
2002-11-19 00:19:03 UTC
Permalink
I'm having this exact same problem with composite keys except it's in my
own code, not the sample. Has anyone resolved it? I'm using jboss
3.0.3 and have duplicated it on postgres and sql server. I saw it first
when jboss tried to create the table. I made a small change in the
jboss src (SQLUtil.java) which fixed it then, but now I see it on the
inserts and I don't really want to try and track it down this time since
it's more complicated. With the create table, there was only one column
list so that was an easy fix. On the insert, the column list & data
both contain duplicate values.

I tried setting the fkcmp=false and this produced different invalid sql
(the where clause was empty) when it tried to check the fk relationship.

Thanks,
Scott
I have implemented InsertReservationAction method, but during save have the
Why person_id_fk and flight_id_fk are repeated two times?
Could not create entity:java.sql.SQLException: Try to insert null into a
non-nullable column in statement [INSERT INTO RESERVATIONS (reservation_id,
person_id_fk, flight_id_fk, registration_utc, comment, person_id_fk,
flight_id_fk) VALUES (5, NULL, NULL, '2002-11-11 11:11:11.0', 'jgkgjgh',
NULL, NULL)]
Best regards,
Dev Zero G Ltd team http://devzerog.com
Loading...