Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10722

[HHH-2872] MappingException thrown for @ManyToOne join if table on the left of the association is alphabetically lower than table on the right

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • EAP_EWP 5.1.2, EAP_EWP 5.2.0
    • Hibernate
    • None
    • NEW

    Description

      https://hibernate.atlassian.net/browse/HHH-2872

      test case: https://github.com/hibernate/hibernate-orm/commit/4d461cc44ebe0f017c6a79471e8e8f77c48450fc

      stacktrace:

      org.hibernate.testing.junit4.CallbackException: org.hibernate.testing.junit4.BaseCoreFunctionalTestCase#buildSessionFactory
      	at org.hibernate.testing.junit4.TestClassMetadata.performCallbackInvocation(TestClassMetadata.java:212)
      	at org.hibernate.testing.junit4.TestClassMetadata.invokeCallback(TestClassMetadata.java:196)
      	at org.hibernate.testing.junit4.TestClassMetadata.performCallbacks(TestClassMetadata.java:190)
      	at org.hibernate.testing.junit4.TestClassMetadata.performBeforeClassCallbacks(TestClassMetadata.java:181)
      	at org.hibernate.testing.junit4.BeforeClassCallbackHandler.evaluate(BeforeClassCallbackHandler.java:42)
      	at org.hibernate.testing.junit4.AfterClassCallbackHandler.evaluate(AfterClassCallbackHandler.java:42)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: org.hibernate.MappingException: Unable to find column with logical name: id_product_code in org.hibernate.mapping.Table(product) and its related supertables and secondary tables
      	at org.hibernate.cfg.Ejb3JoinColumn.checkReferencedColumnsType(Ejb3JoinColumn.java:552)
      	at org.hibernate.cfg.BinderHelper.createSyntheticPropertyReference(BinderHelper.java:257)
      	at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:116)
      	at org.hibernate.cfg.Configuration.processEndOfQueue(Configuration.java:1557)
      	at org.hibernate.cfg.Configuration.processFkSecondPassInOrder(Configuration.java:1478)
      	at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1371)
      	at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1322)
      	at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.afterConstructAndConfigureConfiguration(BaseCoreFunctionalTestCase.java:187)
      	at org.hibernate.testing.junit4.BaseCoreFunctionalTestCase.buildSessionFactory(BaseCoreFunctionalTestCase.java:146)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.hibernate.testing.junit4.TestClassMetadata.performCallbackInvocation(TestClassMetadata.java:209)
      	... 12 more
      
      

      Attachments

        Activity

          People

            brmeyer_jira Brett Meyer (Inactive)
            rhn-support-rmartine Ricardo Martinelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: