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

Stack Overflow | voncuver | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Hibernate OneToMany, natural PK

    Stack Overflow | 7 months ago | voncuver
    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])
  2. 0

    Unable to instantiate custom type error in Hibernate mapping Enum mapping

    Stack Overflow | 4 years ago | Johnny
    org.hibernate.MappingException: Unable to instantiate custom type: org.hibernate.type.EnumType
  3. 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    how to insert values in database using Hibernate in dynamic web project

    Stack Overflow | 2 years ago | Vishnu Ranganathan
    org.hibernate.MappingException: Could not determine type for: String, for columns: [org.hibernate.mapping.Column(email)]

  1. kuldeep 16 times, last 5 months ago
  2. esaar 1 times, last 7 months ago
  3. r1chjames 1 times, last 9 months ago
  4. Kawada 6 times, last 9 months ago
  5. Harsh 1 times, last 11 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 (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()
  2. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:110)
    2. org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:93)
    3. org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1818)
    4. org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1741)
    5. org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1426)
    6. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846)
    7. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930)
    7 frames