[ 
https://issues.apache.org/jira/browse/DDLUTILS-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681850#action_12681850
 ] 

Tomislav Nakic-Alfirevic commented on DDLUTILS-212:
---------------------------------------------------

I have the same problem because is PostgreSQL, you can create an index on e.g. 
"tableoid" which is a "hidden" column so it doesn't show up in select * from... 
and ddlutils doesn't pick up on it. It does, however, prevent me from 
completeing the ant export task. For me, commenting out one line below would be 
a much better solution than halting the whole export:


Index: src/main/java/org/apache/ddlutils/model/Database.java
===================================================================
--- src/main/java/org/apache/ddlutils/model/Database.java       (revision 
753277)
+++ src/main/java/org/apache/ddlutils/model/Database.java       (working copy)
@@ -451,7 +451,7 @@
 
                     if (column == null)
                     {
-                        throw new ModelException("The index "+indexDesc+" in 
table "+curTable.getName()+" references the undefined column 
"+indexColumn.getName());
+                        //throw new ModelException("The index "+indexDesc+" in 
table "+curTable.getName()+" references the undefined column 
"+indexColumn.getName());
                     }
                     else
                     {


> Support for indexes that use functions
> --------------------------------------
>
>                 Key: DDLUTILS-212
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-212
>             Project: DdlUtils
>          Issue Type: New Feature
>          Components: Core - PostgreSql
>    Affects Versions: 1.0
>         Environment: RHEL 4 Linux
>            Reporter: prasanna
>            Assignee: Thomas Dudziak
>
> I created a postgres database and ran this SQL:
> /*create LANGUAGE plpgsql;*/
> CREATE OR REPLACE  FUNCTION FUNC (/*id*/ INTEGER, /*status*/ INTEGER)
>       RETURNS NUMERIC AS'
>  BEGIN
>    RETURN 0;
>  END;
> 'LANGUAGE plpgsql IMMUTABLE;
> create table test_list
>  (
>  test_list_id integer not null, --pk
>  test_id integer not null, --fk
>  status_id integer not null --fk
>  );
> create unique index uq_test_list on test_list(test_list_id, test_id, 
> func(test_list_id, status_id));
> When trying to load the database schema in Jasper Server it fails with this 
> exception:
> Caused by: org.apache.ddlutils.model.ModelException: The index uq_test_list 
> in table test_list references the undefined column func(test_list_id, 
> status_id)
>         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.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1920)
>         at 
> com.jaspersoft.commons.semantic.metaapi.impl.jdbc.BaseJdbcMetaDataFactoryImpl.getMetaData(BaseJdbcMetaDataFactoryImpl.java:82)
> I applied the fix mentioned here:
> https://issues.apache.org/jira/browse/DDLUTILS-192
> Still it fails with the same exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to