Configurable database generated keys support

New boolean attribute in Config - "generatedKeysSupported" (default value=TRUE). User can set true/false for this in Config. If not set in Config, JDB Metadata API check supportsGetGeneratedKeys() is done to detect whether to use auto generated keys during insert.

This gived user flexibility to turn on/off support for database generated keys during INSERT based on the
database vendor/driver version in use. Particularly when user is sure that the DBMS driver does not support
autogenerated keys, he can configure FALSE value through config as below.

Note: For Derby, always assumed generatedKeysSupported=TRUE. This is because current Derby API return FALSE for supportsGetGeneratedKeys(), as it is partially implemented, but in DAS context, this support is sufficient.

<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd" useGetGeneratedKeys="false">
  • No labels