I commented out the @Id fields in:

TblPdtbnf.java

and added:

@EmbeddedId
private TblPdtbnfPK tblPdtbnfPK;

Now I get this exception, which seems more promising, but still no cigar.

Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: DB2 SQL error:
SQLCODE: -530, SQLSTATE: 23503, SQLERRMC: EBSTATUS.TBL_PDTBNF.RCR_PDTBNF_01
{prepstmnt 895244 INSERT INTO EBSTATUS.TBL_PDTBNF (pdtbnfId, scmpdtId,
CMN_DTE, TMN_DTE, VRS_NBR, SCMPDT_ID, PDTBNF_ID) VALUES (?, ?, ?, ?, ?, ?,
?) [params=(null) null, (null) null, (Date) 2008-06-12, (Date) 1001-01-01,
(int) 1, (int) 1500, (int) 13]} [code=-530, state=23503]
        at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
        at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800(LoggingConnectionDecorator.java:57)
        at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:858)
        at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)
        at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1363)
        at
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:97)
        ... 18 more
-- 
View this message in context: 
http://www.nabble.com/%40OneToMany-%40ManyToOne%2C-Bidirectional%2C-Composite-Key-tp17801245p17803487.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to