Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » [Teneo] Unexpected repeated column error
| [Teneo] Unexpected repeated column error [message #122399] |
Tue, 13 May 2008 18:36  |
David Wynter Messages: 4507 Registered: July 2009 |
Senior Member |
|
|
Hi,
I am getting and error I cannot see an obvious cause for .
Based on the ecore generated from this
<xsd:complexType name="StatusChangeSubclass">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" ref="gensec:meetingType" />
<xsd:element minOccurs="0" maxOccurs="1" ref="gensec:agent" />
<xsd:element minOccurs="0" maxOccurs="1"
ref="gensec:caeLifecycleType" />
<xsd:element minOccurs="0" maxOccurs="1"
ref="gensec:caeStatusType" />
<xsd:element ref="gensec:caeType" />
<xsd:element minOccurs="0" maxOccurs="1"
ref="gensec:entityIdentifier" />
<xsd:element minOccurs="0" maxOccurs="1"
ref="gensec:indicatorsType" />
<xsd:element minOccurs="0" maxOccurs="1"
ref="gensec:instrumentIdentifier" />
<xsd:element minOccurs="0" maxOccurs="1" ref="gensec:issuerRef" />
<xsd:element minOccurs="0" maxOccurs="1"
ref="gensec:dataValueChange" />
<xsd:element minOccurs="0" maxOccurs="1" ref="gensec:source" />
<xsd:element minOccurs="0" maxOccurs="1" ref="gensec:relatedTo" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:int" use="optional" />
<xsd:attribute name="effectiveDate" type="xsd:dateTime"
use="optional" />
<xsd:attribute name="announcementDate" type="xsd:dateTime"
use="optional" />
<xsd:attribute name="meetingDate" type="xsd:dateTime" use="optional" />
<xsd:attribute name="recordDate" type="xsd:dateTime" use="optional" />
<xsd:attribute name="comment" type="xsd:string" use="optional" />
<xsd:attribute name="documentURL" type="xsd:anyURI" use="optional" />
<xsd:attribute name="caeIdentifier" type="xsd:string" use="optional" />
<xsd:attribute name="eventDescription" type="xsd:string"
use="optional" />
<xsd:attribute name="caeDate" type="xsd:dateTime" use="optional" />
</xsd:complexType>
I am using
props.setProperty(PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH ,
"30");
props.setProperty(PersistenceOptions.JOIN_COLUMN_NAMING_STRA TEGY, "simple");
props.setProperty(PersistenceOptions.ID_COLUMN_NAME, "id");
props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
"false");
props.setProperty(PersistenceOptions.ALSO_MAP_AS_CLASS, "false");
props.setProperty(PersistenceOptions.DEFAULT_TEMPORAL_VALUE,
"DATE");
props.setProperty(PersistenceOptions.DISABLE_ECONTAINER_MAPP ING, "true");
props.setProperty(PersistenceOptions.ALWAYS_VERSION, "false");
props.setProperty(PersistenceOptions.ALWAYS_MAP_LIST_AS_BAG,
"true");
props.setProperty(PersistenceOptions.INHERITANCE_MAPPING,
"JOINED");
The ID_COLUMN_NAME option I read as meaning it recognises the model
attribute with the name of "id" as the primary key
There is only one id attribute, also in the ecore, so how come I get the
following error?
I use Eclise 3.3, JDK 5 and Teneo from the 23rd April
Exception in thread "main" org.hibernate.MappingException: Repeated
column in mapping for entity: StatusChangeSubclass column: id (should be
mapped with insert="false" update="false")
at
org.hibernate.mapping.PersistentClass.checkColumnDuplication (PersistentClass.java:652)
at
org.hibernate.mapping.PersistentClass.checkPropertyColumnDup lication(PersistentClass.java:674)
Thx.
David
|
|
|
Goto Forum:
Current Time: Tue May 21 05:12:26 EDT 2013
Powered by FUDForum. Page generated in 0.04685 seconds
|