[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1988) Repeated column chack fails with SingleTable inheritance, biut not with TablePerClass

Sergey Vladimirov (JIRA) noreply at atlassian.com
Wed Jul 18 05:32:52 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27547 ] 

Sergey Vladimirov commented on HHH-1988:
----------------------------------------

Jürgen,

The problem is:
 - Hibernate didn't report the error if strategy != InheritanceType.SINGLE_TABLE

The repeated problem column is already fixed, but it was very hard to find it - because of this issue.

> Repeated column chack fails with SingleTable inheritance, biut not with TablePerClass
> -------------------------------------------------------------------------------------
>
>                 Key: HHH-1988
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1988
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: metamodel
>    Affects Versions: 3.2.0.cr3
>         Environment: HA last from SVN, HEM last from SVN, MySQL
>            Reporter: Sergey Vladimirov
>         Attachments: discriminator.zip
>
>
> Not sure about component.
> Parent class introduce field, which is also discriminator field.
> Hibernate reports error in child class if and only if strategy = InheritanceType.SINGLE_TABLE
> org.hibernate.MappingException: Repeated column in mapping for entity: ru.arptek.arpsite.data.discriminator.IntegerSingleChild column: type (should be mapped with insert="false" update="false")
> 	at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:590)
> 	at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(PersistentClass.java:612)
> 	at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:630)
> 	at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:405)
> 	at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:43)
> 	at org.hibernate.cfg.Configuration.validate(Configuration.java:1026)
> 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
> 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:631)
> 	at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:760)
> 	at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:627)
> 	at ru.arptek.arpsite.data.AbstractHibernateJUnitTest.setUp(AbstractHibernateJUnitTest.java:89)
> 	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 org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Test cas works with strategy = InheritanceType.TABLE_PER_CLASS

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