db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rijk van Haaften (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (DDLUTILS-205) Upper case indexed column name causes Exception on readModelFromDatabase call
Date Tue, 03 Jun 2008 14:38:45 GMT

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

cordeo edited comment on DDLUTILS-205 at 6/3/08 7:37 AM:
-------------------------------------------------------------------

I cannot reproduce it on psql 8.3.1. (I still use postgresql-8.2-506.jdbc3.jar though.) Try
an upgrade?

      was (Author: cordeo):
    I cannot reproduce it on psql 8.3.1. Try an upgrade?
  
> Upper case indexed column name causes Exception on readModelFromDatabase call
> -----------------------------------------------------------------------------
>
>                 Key: DDLUTILS-205
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-205
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - PostgreSql
>    Affects Versions: 1.0
>         Environment: DB: psql 8.2.3, JDBC: postgresql-8.2-504.jdbc3.jar, OS: Windows
XP Pro, DdlUtils: 1.0
>            Reporter: Andrew S.
>            Assignee: Thomas Dudziak
>            Priority: Blocker
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Consider the following example:
> ----
> CREATE TABLE product (
>     product_class_id integer NOT NULL,
>     product_id integer NOT NULL,
>     brand_name character varying(60),
>     product_name character varying(60) NOT NULL,
>     "SKU" bigint NOT NULL,
>     "SRP" numeric(10,4),
>     gross_weight real,
>     net_weight real,
>     recyclable_package boolean,
>     low_fat boolean,
>     units_per_case smallint,
>     cases_per_pallet smallint,
>     shelf_width real,
>     shelf_height real,
>     shelf_depth real
> );
> CREATE INDEX "i_product_SKU" ON product USING btree ("SKU");
> ---
> When such DB gets read by calling readModelFromDatabase(.), the following exception happens:
> org.apache.ddlutils.model.ModelException: The index i_product_SKU in table product references
the undefined column "SKU"
> 	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 DdlUtilsExample.main(DdlUtilsExample.java:66)
> While table gets the column name as [SKU], index gets it as ["SKU"]. On checkup in Database.initialize(),
indexed column cannot be found by name under given table,  and Exception gets thrown.
> It looks like a postgresql bug in JDBC driver that needs a special care in this project.

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


Mime
View raw message