[
https://issues.apache.org/jira/browse/OJB-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Armin Waibel resolved OJB-129.
------------------------------
Resolution: Fixed
Fix Version/s: 1.0.5
Hi,
I changed class SequenceManagerIdentityImpl to support the new JDBC-method
stmt.getGeneratedKeys(). By default OJB checks the DB-metadata for support of
autogeneratedKeys. If true stmt.getGeneratedKeys() is used, else the old
identity-select call is used.
Additional you can specifiy a property in the metadata mapping:
<jdbc-connection-descriptor...
...
<sequence-manager>
.....
<!-- If set 'true' OJB use the JDBC 3.0 method
"Statement.getGeneratedKeys()"
to obtain generated database identity keys. If set 'false' OJB use
a separate
database specific "last identity call" query to request the
generated identity key. -->
<attribute attribute-name="seq.generatedKeys" attribute-value="true"/>
</sequence-manager>
NOTE: If seq.generatedKeys is enabled OJB expects that JDBC 3.0 property
generatedKeys is enabled by default in the JDBC-driver (OJB currently doesn't
use Statement.RETURN_GENERATED_KEYS to enable generatedKeys feature at
runtime). So take care that your database/driver supports this by default.
If you need a more general support for the new JDBC feature, please reopen this
feature-request and post more details.
regards,
Armin
> Add JDBC 3.0 "Retrieval of Auto Generated Keys" support
> -------------------------------------------------------
>
> Key: OJB-129
> URL: https://issues.apache.org/jira/browse/OJB-129
> Project: OJB
> Issue Type: New Feature
> Components: PB-API
> Affects Versions: 1.0.4
> Reporter: Mike Perham
> Fix For: 1.0.5
>
>
> http://www.datadirect.com/developer/jdbc/topics/jdbc30/index.ssp
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]