Community
Participate
Working Groups
Hello, we faced the following problem using Postgresql 8.4: Having a class BankAccount with two sets (A and B) both referencing class BookingLine, the generated SQL will be as follows: - Table BankAccount * id * ... - Table BookingLine * id * ... - N:M Table BankAccount_BookingLine * bankAccount_id NOT NULL * setA_bookingLine_id NOT NULL * setB_bookingLine_id NOT NULL See the problem? If I add a new BookingLine to a BankAccount in one set (let's assume set A), the generated SQL will look as follows: INSERT INTO BankAccount_BookingLine VALUES (1, 23, null) which leads to a constraint violation because of the NOT NULL constraints. A workaround: Use @JoinTable to specify a different join table for each set. I don't know what is the best behaviour in this case but I believe that EclipseLink should not generate a schema that cannot be used properly with the corresponding data model. Hope it helps, Fabian
Setting target and priority. See the following page for details of the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink