[
https://jira.jboss.org/browse/TEIIDDES-550?page=com.atlassian.jira.plugin...
]
Barry LaFond commented on TEIIDDES-550:
---------------------------------------
StandardDdlParser.parseColumnConstraint() LINE 1551
if NO columns names are added from the parseColumnNameList() call (i.e See the block for
UNIQUE above it), then we need to add THIS column name as a reference just like the UNIQUE
block above it.
So adding a variable to check the result just like the case above it should do the trick:
// CONSUME COLUMNS
boolean columnsAdded = parseColumnNameList(tokens, constraintNode,
TYPE_COLUMN_REFERENCE);
if (!columnsAdded) {
nodeFactory().node(colName, constraintNode, TYPE_COLUMN_REFERENCE);
}
Import DDL to Relational Table misses columns for primary, foreign
keys
-----------------------------------------------------------------------
Key: TEIIDDES-550
URL:
https://jira.jboss.org/browse/TEIIDDES-550
Project: Teiid Designer
Issue Type: Bug
Components: Import/Export
Affects Versions: 7.1
Environment: Fedora 12, JBDS 3.0.1, TeiidDesigner 7.1 M1
Reporter: Paul Nittel
Assignee: Dan Florian
Fix For: 7.1.1
Attachments: motels.ddl
I imported the motels.ddl example file to populate the foo model. When finished
importing, I had a number of errors where the importer had created primary and foreign
keys without specifying columns for those keys. In one case, here's the DDL:
CREATE TABLE CustomerFamilyHistory
(
customerfamilyhistoryid number(10) CONSTRAINT customerfamilyhistoryid_pk PRIMARY KEY,
firstname varchar2(50) NOT NULL,
lastname varchar2(50) NOT NULL,
age number(3),
sibling varchar2(20),
customerid number(7) NOT NULL
);
The primary key, customerfamilyhistoryid_pk, is created, but no reference to
customerfamilyhistoryid is provided.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira