Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Switch to DB2 and not getting identity columns
[Teneo] Switch to DB2 and not getting identity columns [message #619149] Mon, 02 June 2008 16:18
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member

I was successfully generating a schema on MySQL and getting the auto
increment on the id primary key column. I switched to DB2 dialect and if
I leave the primary key as e_id I do get IDENTITY columns but when I use
id in the model with the annotation I do not get them. Am I missing

Here are my properties

props.setProperty(Environment.DRIVER, "");
props.setProperty(Environment.USER, "Administrator");
props.setProperty(Environment.PASS, "e*****");
props.setProperty(Environment.URL, "jdbc:db2://"
+ dbName);
props.setProperty(PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH ,
props.setProperty(PersistenceOptions.ID_FEATURE_AS_PRIMARY_K EY,
props.setProperty(PersistenceOptions.DEFAULT_ID_FEATURE_NAME ,

props.setProperty(PersistenceOptions.JOIN_COLUMN_NAMING_STRA TEGY, "simple");
props.setProperty(PersistenceOptions.ALSO_MAP_AS_CLASS, "false");

props.setProperty(PersistenceOptions.DISABLE_ECONTAINER_MAPP ING, "true");
props.setProperty(PersistenceOptions.ALWAYS_VERSION, "false");

Here is a sample of the XSD

<xsd:complexType name="Tranche">
<xsd:sequence minOccurs="0" maxOccurs="1">
<xsd:element ref="gensec:source" />
<xsd:attribute name="id" type="xsd:int">
<xsd:appinfo source="teneo.jpa">@Id</xsd:appinfo>
name="scheme" use="optional" />
<xsd:attribute name="nameRef" type="xsd:anyURI" />
<xsd:attribute default="valid" name="validity"
type="gensec:QualityEnumeration" use="optional" />
<xsd:attribute name="rank" type="xsd:int" />
<xsd:element name="tranche" type="gensec:Tranche" />


Previous Topic:[EMF Compare] Innacuracies while comparing lists of very similar elements
Next Topic:[Compare] is it possible for the diff to hold the old values?
Goto Forum:

Current Time: Tue Mar 31 03:25:43 GMT 2020

Powered by FUDForum. Page generated in 0.01941 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top