[ https://issues.apache.org/jira/browse/DDLUTILS-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913929#action_12913929 ]
sunil commented on DDLUTILS-178: -------------------------------- Dear Thomas Dudziak Can u send me the ddutils-1.1.jar please its urgent for me b'coz i have same problem while configuring symmetricDS2.0.x version in postgresql 8.0 and 8.2 primary key shows index as ("first column",second) means column name in ("") and throws the same exception waiting for ur reply > ModelException thrown when reading columns with "special" names > --------------------------------------------------------------- > > Key: DDLUTILS-178 > URL: https://issues.apache.org/jira/browse/DDLUTILS-178 > Project: DdlUtils > Issue Type: Bug > Components: Core - PostgreSql > Affects Versions: 1.0 RC2 > Environment: PostgreSQL 8.2 on Ubuntu 7.04. Java 6. > Reporter: Adrián Romero > Assignee: Thomas Dudziak > Fix For: 1.1 > > Attachments: remove-quotes.patch > > > Trying to execute the method "readModelFromDatabase" a ModelException is > thrown. The database has only one table with a field named "year". If this > field is renamed by another name it works ok. The field "year" appears in the > pgAdmin tool with quotes. This must be the reason why DDLutils throws the > ModelException. > This is the exception thrown: > org.apache.ddlutils.model.ModelException: The index ad_sequence_no_key in > table ad_sequence_no references the undefined column "year" > at org.apache.ddlutils.model.Database.initialize(Database.java:393) > at > org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484) > at > org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432) > at > org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884) > at > org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869) > at org.openbravo.ddl.Test.main(Test.java:52) > The database was previously populated with the following XML:: > <?xml version="1.0"?> > <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database"> > <database name="openbravo-tests"> > <table name="ad_sequence_no"> > <column name="ad_sequence_id" primaryKey="false" required="true" > type="NUMERIC" size="10" autoIncrement="false"/> > <column name="year" primaryKey="false" required="true" type="VARCHAR" > size="4" default="0000" autoIncrement="false"/> > <column name="ad_client_id" primaryKey="false" required="true" > type="NUMERIC" size="10" autoIncrement="false"/> > <unique name="ad_sequence_no_key"> > <unique-column name="ad_sequence_id"/> > <unique-column name="year"/> > </unique> > </table> > </database> > And in the pgAdmin tool, the table definition is: > -- Table: ad_sequence_no > -- DROP TABLE ad_sequence_no; > CREATE TABLE ad_sequence_no > ( > ad_sequence_id numeric(10) NOT NULL, > "year" varchar(4) NOT NULL DEFAULT '0000'::character varying, > ad_client_id numeric(10) NOT NULL > ) > WITHOUT OIDS; > ALTER TABLE ad_sequence_no OWNER TO tad; > -- Index: ad_sequence_no_key > -- DROP INDEX ad_sequence_no_key; > CREATE UNIQUE INDEX ad_sequence_no_key > ON ad_sequence_no > USING btree > (ad_sequence_id, "year"); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.