writeschematofile - Database model fails to find column names of indices with 
qualifiers (postgres)
---------------------------------------------------------------------------------------------------

                 Key: DDLUTILS-138
                 URL: http://issues.apache.org/jira/browse/DDLUTILS-138
             Project: DdlUtils
          Issue Type: Bug
          Components: Ant Tasks
         Environment: JDK 1.6, Postgresql 8.2, SVN version of DdlUtills
            Reporter: Tobias Kalbitz
         Assigned To: Thomas Dudziak


Example Table:

CREATE TABLE users (
  id BIGSERIAL PRIMARY KEY,
  username VARCHAR(30) NOT NULL UNIQUE
) WITHOUT OIDS;

CREATE INDEX users_username ON users(username);
CREATE INDEX users_username_lower ON users(LOWER(username));

The problem is located on line 390 of the database model.

The first index column (username) will be found by the database model
In the second case indexColumn.getName() returns  "LOWER(username)" which can't 
be find as column -> exception 

Workaround for me is to use a substring of the columnname, but this isn't a 
solution which is portable across databases.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to