[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-688) Repeated columns created for single table inheritance

Nick Heudecker (JIRA) noreply at atlassian.com
Fri Jan 4 17:38:55 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29237 ] 

Nick Heudecker commented on ANN-688:
------------------------------------

Please close this ticket.  It turned out to be an internal issue on my end.  Apologies for the report.  

> Repeated columns created for single table inheritance
> -----------------------------------------------------
>
>                 Key: ANN-688
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-688
>             Project: Hibernate Annotations
>          Issue Type: Bug
>    Affects Versions: 3.3.0.ga
>         Environment: Hibernate 3.2.5ga, Postgresql
>            Reporter: Nick Heudecker
>
> I have the following classes:
> @Entity
> @Inheritance(strategy= InheritanceType.SINGLE_TABLE)
> @DiscriminatorColumn(name="cltype", discriminatorType= DiscriminatorType.STRING, length=10)
> @DiscriminatorValue("device")
> public abstract class Device extends AbstractPersistent {
>     private System system;
>     @ManyToOne
>     public System getSystem() {
>         return system;
>     }
>     public void setSystem(System system) {
>         this.system = system;
>     }
> }
> @Entity
> @DiscriminatorValue("snmp")
> public class SnmpDevice extends Device {
>     // .... additional properties defined
> }
> When I try to create the SessionFactory, I'm getting the following exception:
> Caused by: org.hibernate.MappingException: Repeated column in mapping for entity: model.SnmpDevice column: system_uuid (should be mapped with insert="false" update="false")
> 	at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:652)
> 	at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(PersistentClass.java:674)
> 	at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:696)
> 	at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:450)
> 	at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:43)
> 	at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
> 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)

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