Thanks for the detailed info. I will take a look at what can be done to address this.

Satheesh

Jean T. Anderson (JIRA) wrote:
    [ http://issues.apache.org/jira/browse/DERBY-142?page=comments#action_12331614 ] 

Jean T. Anderson commented on DERBY-142:
----------------------------------------

I attached a new test case, DerbyTest142.java, based on db-derby-10.1.1.0-bin/demo/simple/SimpleApp.java that demonstrates the problem with the Derby 
Network Client (Derby 10.1.1.0). You can compile the app to run in embedded mode or in Derby Network Client mode. 

The output for the embedded run shows that the ID and NAME columns are writeable:

[EMAIL PROTECTED] DERBY-142]$ java -Dderby.system.home=$DERBY_SYSTEM_HOME DerbyTest142
DerbyTest142 starting in embedded mode.
Loaded the appropriate driver.
Connected to and created database test
Created table readonlytest
ID column is writeable
Name column is writeable
Dropped table readonlytest
Closed result set and statement
Committed transaction and closed connection
Database shut down normally
DerbyTest142 finished

The output for the Derby Network Client run shows that the columns are readonly:

[EMAIL PROTECTED] DERBY-142]$ java -Dderby.system.home=$DERBY_SYSTEM_HOME DerbyTest142
DerbyTest142 starting in Derby Network Client mode.
Loaded the appropriate driver.
Connected to and created database test
Created table readonlytest
ID column is readonly
Name column is readonly
Dropped table readonlytest
Closed result set and statement
Committed transaction and closed connection
DerbyTest142 finished

Thomas Fischer explained in http://mail-archives.apache.org/mod_mbox/db-torque-dev/200510.mbox/[EMAIL PROTECTED] that  this problem prevents Torque from working with Derby and the network server:

  
The problem was that the network driver in the meta-info
declared all columns to be read-only, which causes a library used
internally in Torque (village) to refuse to write any datasets into the
table. The problem is described in the Bug DERBY-142 in Derby's Jira.

However, in future releases of Torque, it is quite probable that village is
removed, so this will not be problematic any longer. 
    


  
ResultSetMetaData.isReadOnly() also returns wrong results
---------------------------------------------------------

         Key: DERBY-142
         URL: http://issues.apache.org/jira/browse/DERBY-142
     Project: Derby
        Type: Sub-task
  Components: JDBC
    Versions: 10.0.2.1
 Environment: Using DB2 universal driver with standalone derby server
    Reporter: Thomas Fischer
 Attachments: DerbyTest.java, DerbyTest142.java

ResultSetMetaData.isReadOnly() always returns true, even when writing to the table is possible.  
The JDBC 2.0 spec says: "ResultSetMetaData.isReadOnly() : Indicates whether the designated column is definitely not writable.", so the method should return false for a table.
I will attach a testcase for this behaviour.
    

  

Reply via email to