db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Walker" <walkerricha...@gmail.com>
Subject Re: Will migrating from 3.0 to 3.3 help me?
Date Fri, 03 Oct 2008 01:17:57 GMT
>> How about you make yourself a copy of village.jar with the offending lines
>> in the Column class commented out and see if your queries still execute
>> correctly.  Really this would just be the opposite of having the stub
>> methods in the old JDBC driver.  Provided your application is not accessing
>> the metadata present in the Column class (directly or indirectly) this
>> should be a valid approach.

I've traced the extra queries to these two lines in Column.java:

        this.nullAllowed = rsmd.isNullable(columnNumber) == 1;
        this.autoIncrement = rsmd.isAutoIncrement(columnNumber);

I checked the source of the old driver; it hard-codes the
results of those queries, so this.nullAllowed and this.autoIncrement
are always set to false.

So I made this modification:

        this.nullAllowed = false; // rsmd.isNullable(columnNumber) == 1;
        this.autoIncrement = false; // rsmd.isAutoIncrement(columnNumber);

And it works!  No more extra queries.

Problem solved - for me, anyway.
Thanks for the hints.

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message