[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-688?page=co...
]
Mark Koch commented on ANN-688:
-------------------------------
Nick, what was the internal issue. I'm seeing the same error message and can't
figure out what I've missed.
Thanks,
Mark
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira