db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hermansen <and...@yoyo.no>
Subject Reversedb tool and getPrimaryKeys
Date Tue, 17 Dec 2002 18:06:04 GMT
Hello,

I have used the reversedb tool to generate mappings for my postgresql
database. During this I have come accross the following.

org/apache/ojb/tools/mapping/reversedb/DbMeta.java line 279:
rs = this.dbMeta.getPrimaryKeys(null, null, null);

The javadoc for the DatabaseMetaData.getPrimaryKeys method says this:
<quote>
Parameters:
    catalog - a catalog name; must match the catalog name as it is stored in the database;
"" retrieves those without a catalog; null means that the catalog name should not be used
to narrow the search
    schema - a schema name; must match the schema name as it is stored in the database; ""
retrieves those without a schema; null means that the schema name should not be used to narrow
the search
    table - a table name; must match the table name as it is stored in the database
</quote>

As you can see catalog and schema is specified to have null as a valid
value, but table is not.

I made a patch agains postgresql jdbc driver to make it work as the
reversedb application expected, but it was rejected by the psotgresql
jdbc developers because it is not according to the jdbc specifications.

Is this a bug in the reversedb application?
If it is I can probably prepare a patch which will use getPrimaryKeys
for each table.


Anders

--
Anders Hermansen
YoYo Mobile as

Mime
View raw message