[hibernate-issues] [Hibernate-JIRA] Updated: (ANN-602) SecondaryTable with EmbeddedId or IdClass containing @ManyToOne fail

Emmanuel Bernard (JIRA) noreply at atlassian.com
Wed Jul 11 18:22:52 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard updated ANN-602:
---------------------------------

    Fix Version/s: 3.3.1
          Summary: SecondaryTable with EmbeddedId or IdClass containing @ManyToOne fail  (was: SecondaryTable with EmbeddedId and IdClass is broken)

> SecondaryTable with EmbeddedId or IdClass containing @ManyToOne fail
> --------------------------------------------------------------------
>
>                 Key: ANN-602
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-602
>             Project: Hibernate Annotations
>          Issue Type: Bug
>          Components: binder
>    Affects Versions: 3.3.0.ga
>         Environment: Hibernate Core 3.2.3 GA 
> Hibernate Annotations 3.3.0.GA 
> hibernate-entitymanager-3.3.1.GA
>            Reporter: Chandra
>             Fix For: 3.3.1
>
>         Attachments: CompositeIdTest.java, TvProgram.java, TvProgramIdClass.java
>
>
> I added following two classes (TvProgram and TvProgramIdClass) in org.hibernate.test.annotations.cid package. And added two test cases to org.hibernate.test.annotations.cid.CompositeIdTest. See testSecondaryTableWithCompositeId and testSecondaryTableWithIdClass methods in attached fi
> The test cases fail with following output. However, if I remove SecondaryTable and secondary table @Column, test cases pass.
> 12:43:15,534  INFO Version:15 - Hibernate Annotations 3.3.0.GA
> 12:43:15,550  INFO Environment:509 - Hibernate 3.2.3
> 12:43:15,565  INFO Environment:527 - loaded properties from resource hibernate.properties: {hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.proxool.pool_alias=pool1, hibernate.bytecode.use_reflection_optimizer=false, hibernate.default_batch_fetch_size=100, hibernate.cache.use_query_cache=true, hibernate.jdbc.use_streams_for_binary=true, hibernate.max_fetch_depth=1, hibernate.format_sql=true, hibernate.connection.pool_size=1, hibernate.connection.username=sa, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.order_updates=true, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.connection.url=jdbc:hsqldb:.}
> 12:43:15,565  INFO Environment:558 - using java.io streams to persist binary types
> 12:43:15,581  INFO Environment:676 - Bytecode provider name : cglib
> 12:43:15,581  INFO Environment:593 - using JDK 1.4 java.sql.Timestamp handling
> 12:43:15,675  INFO Dialect:152 - Using dialect: org.hibernate.dialect.HSQLDialect
> 12:43:15,815  INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Parent
> 12:43:15,862  INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Parent on table Parent
> 12:43:15,894  INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Child
> 12:43:15,909  INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Child on table Child
> 12:43:15,925  INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Channel
> 12:43:15,925  INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Channel on table Channel
> 12:43:15,941  INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.TvMagazin
> 12:43:15,941  INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.TvMagazin on table TvMagazin
> 12:43:15,941  INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.TvProgramIdClass
> 12:43:15,941  INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.TvProgramIdClass on table TvProgramIdClass
> 12:43:15,956  INFO EntityBinder:631 - Adding secondary table to entity org.hibernate.test.annotations.cid.TvProgramIdClass -> TV_PROGRAM_IDCLASS
> java.util.NoSuchElementException
> 	at java.util.AbstractList$Itr.next(AbstractList.java:427)
> 	at org.hibernate.util.JoinedIterator.next(JoinedIterator.java:53)
> 	at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:210)
> 	at org.hibernate.cfg.annotations.EntityBinder.createPrimaryColumnsToSecondaryTable(EntityBinder.java:483)
> 	at org.hibernate.cfg.annotations.EntityBinder.finalSecondaryTableBinding(EntityBinder.java:440)
> 	at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:770)
> 	at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498)
> 	at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277)
> 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
> 	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
> 	at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51)
> 	at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at junit.textui.TestRunner.doRun(TestRunner.java:116)
> 	at com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:65)
> 	at junit.textui.TestRunner.doRun(TestRunner.java:109)
> 	at com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
> java.util.NoSuchElementException
> 	at java.util.AbstractList$Itr.next(AbstractList.java:427)
> 	at org.hibernate.util.JoinedIterator.next(JoinedIterator.java:53)
> 	at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:210)
> 	at org.hibernate.cfg.annotations.EntityBinder.createPrimaryColumnsToSecondaryTable(EntityBinder.java:483)
> 	at org.hibernate.cfg.annotations.EntityBinder.finalSecondaryTableBinding(EntityBinder.java:440)
> 	at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:770)
> 	at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498)
> 	at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277)
> 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
> 	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
> 	at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51)
> 	at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list