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])

Coderanch | Arun Giridharan | 5 years ago
  1. 0

    Foreign key must have same number of columns (Object Relational Mapping forum at Coderanch)

    coderanch.com | 8 months ago
    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])
  2. 0

    Foreign key must have same number of columns

    Coderanch | 5 years ago | Arun Giridharan
    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])
  3. 0

    Re:orm.PersistentException: Failed to create ThreadBaseSessionController

    Visual-paradigm | 7 years ago | Dr.Drane
    org.orm.PersistentException: Failed to create ThreadBaseSessionController
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate mapping. Table related with other two

    Stack Overflow | 1 year ago | Rob
    org.hibernate.MappingException: An association from the table A refers to an unmapped class: Shortcut
  6. 0

    BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/.../DataConfiguration.class]:

    Stack Overflow | 2 years ago | AixNPanes
    javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory

  1. kuldeep 16 times, last 3 months ago
  2. esaar 1 times, last 4 months ago
  3. r1chjames 1 times, last 6 months ago
  4. Kawada 6 times, last 6 months ago
  5. Harsh 1 times, last 8 months ago
34 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:90)
    2. org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
    3. org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1263)
    4. org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1170)
    5. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
    5 frames
  3. com.demo
    Demo.main
    1. com.demo.Demo.main(Demo.java:26)
    1 frame