org.hibernate.MappingException: Foreign key (FK250691B08CBB085E:STUDENT_ADDRESS [ADDRESS_ID])) must have same number of columns as the referenced primary key (STUDENT_ADDRESS [STUDENT_ID,ADDRESS_ID])

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 coderanch.com by Unknown author, 1 year ago
Foreign key (FK250691B08CBB085E:STUDENT_ADDRESS [ADDRESS_ID])) must have same number of columns as the referenced primary key (STUDENT_ADDRESS [STUDENT_ID,ADDRESS_ID])
via Coderanch by Arun Giridharan, 1 year ago
Foreign key (FK250691B08CBB085E:STUDENT_ADDRESS [ADDRESS_ID])) must have same number of columns as the referenced primary key (STUDENT_ADDRESS [STUDENT_ID,ADDRESS_ID])
via Coderanch by Yaki Kumar, 11 months ago
Foreign key (FKC3DDB2345834AA5C:PROJECT_INFO [PROJECT_REF_NAME])) must have same number of columns as the referenced primary key (PROJECTS [PROJECT_NAME,START_DATE])
via Stack Overflow by Noor
, 2 years ago
Foreign key (FK6214B38B81858749:BUSINESSUSER [BUSINESSNAME])) must have same number of columns as the referenced primary key (BUSINESSUSER [BUSINESSNAME,idx])
via coderanch.com by Unknown author, 1 year ago
Foreign key (FKBB3E234E2C0B82A3 O FFICER_AGENCY [INT_OFCR2AGCY_ID])) must have same number of columns as the referenced primary key (AGENCY [AGENCY_CODE,SUB_AGENCY_CODE])
via Coderanch by Jenny George, 11 months ago
Foreign key (FKBB3E234E2C0B82A3 O FFICER_AGENCY [INT_OFCR2AGCY_ID])) must have same number of columns as the referenced primary key (AGENCY [AGENCY_CODE,SUB_AGENCY_CODE])
org.hibernate.MappingException: Foreign key (FK250691B08CBB085E:STUDENT_ADDRESS [ADDRESS_ID])) must have same number of columns as the referenced primary key (STUDENT_ADDRESS [STUDENT_ID,ADDRESS_ID])
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:90)
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1263)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1170)
at com.demo.Demo.main(Demo.java:26)

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
Samebug visitor profile picture
Unknown user
Once, 1 year ago
37 more bugmates

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