Bug 498410 - Eclipse Link is unable to persist Data for Tables having Foreign Key reference.
Summary: Eclipse Link is unable to persist Data for Tables having Foreign Key reference.
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: Sun Solaris
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-25 03:30 EDT by Abhishek VS CLA
Modified: 2022-06-09 10:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abhishek VS CLA 2016-07-25 03:30:22 EDT
We have two tables Audit and Audit_CHECK, where Audit Check has a unique key called AUDIT_CHECK_ID which refers AUDIT_ID from AUDIT table as foreign key reference.

When we used Jconnect 6, this relation had no problem in inserting the data and retrieving the same. 

But when we migrated to Jconnect 7 and we are getting below mentioned Error.
When we insert the data manually to above mentioned tables it works fine, while doing the same using Eclipse link we are getting Error. 

Error Details: 
 Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.3.v20160428-59c81c5): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.sybase.jdbc4.jdbc.SybSQLException: Foreign key constraint violation occurred, dbname =  'irathomauditdb', table name = 'AUDIT_CHECK', constraint name = 'FK_AUDIT_CHECK_AUDIT_ID'.

Error Code: 546
Call: INSERT INTO AUDIT_CHECK (GSM_BRC_FILTER, NAME, RANTYPE, RNRLOGFILE, RULEFILE, TYPE, UTRAN_BRC_FILTER, AUDIT_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
        bind => [8 parameters bound]
Query: ValueReadQuery(name="SEQ_GEN_IDENTITY" sql="SELECT @@IDENTITY")


Hence request you to let us know if this is and issue from Eclipse Link. for more details or logs you can comment or contact me on below mentioned id.

id: vsabhishek27@gmail.com
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:03:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink