org.hibernate.MappingException: Foreign key (FK_9897tr114hxkewktsi9vb92x6:CHILD[REFID])) must have same number of columns as the referenced primary key (PARENT[VENDOR,CHANNEL,CREATEDATE,REFID])

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by voncuver
, 1 year ago
Foreign key (FK_9897tr114hxkewktsi9vb92x6:CHILD[REFID])) must have same number of columns as the referenced primary key (PARENT[VENDOR,CHANNEL,CREATEDATE,REFID])
via Stack Overflow by user3280473
, 2 years ago
Foreign key (FKE4CBBDD4A8078EF2:table_b [tableC_cid])) must have same number of columns as the referenced primary key (Table_C[c_id,tableD_d_id])
via Stack Overflow by Dave
, 2 years ago
Foreign key (FK4719AC489E4DD84:group_member [members_ID])) must have same number of columns as the referenced primary key (group_member [GROUP_ID,members_ID])
via Stack Overflow by Nishank
, 2 years ago
Foreign key (FK76F831D84C8F0D59:D[A_B_Id])) must have same number of columns as the referenced primary key (A_B[A_Id,idx])
via Stack Overflow by Chaitanya
, 2 years ago
Foreign key (FK_89b4nqt5l2n6tfd1d5tq0ill0:TEST_OrderLine [orderId,customerId])) must have same number of columns as the referenced primary key (TEST_Order [id])
via Stack Overflow by Surendran Duraisamy
, 1 year ago
Foreign key (FK2C47CFCAB95CF1D: EMP [ADDR_ID,ADDR_ZIP])) must have same number of columns as the referenced primary key (ADDRESS [ID_COL])
org.hibernate.MappingException: Foreign key (FK_9897tr114hxkewktsi9vb92x6:CHILD[REFID])) must have same number of columns as the referenced primary key (PARENT[VENDOR,CHANNEL,CREATEDATE,REFID])
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:110)
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:93)
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1818)
at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1741)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1426)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
193 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
4 times, 5 months ago
37 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.