[EMAIL PROTECTED] wrote:
                        if (revisionNumber == null)
                                statement = connection.prepareStatement(
                                        "delete from PERMISSIONS where
(OBJECT_ID, SUBJECT_ID, ACTION_ID) IN ( SELECT ou.URI_ID, su.URI_ID, au.URI_ID
FROM URI ou, URI su, URI au WHERE ou.URI_STRING = ? and su.URI_STRING = ? and
au.URI_STRING = ?) and VERSION_NO IS NULL");
                        else
                                statement = connection.prepareStatement(
                                        "delete from PERMISSIONS where
(OBJECT_ID, SUBJECT_ID, ACTION_ID) IN ( SELECT ou.URI_ID, su.URI_ID, au.URI_ID
FROM URI ou, URI su, URI au WHERE ou.URI_STRING = ? and su.URI_STRING = ? and
au.URI_STRING = ?) and VERSION_NO = ?");

...which reminds me that the method used in CommonRDBMSAdapter, although fixed since yesterday, is not very clever re PreparedStatement as it uses a hardcoded revision number as parameter #4.

Eg suffix "and VERSION_NO = 1.0" vs "and VERSION_NO = 1.1" makes the statements
non-reusable although they are PreparedStatements.

My previous patch for CommonRDBMSAdapter sholud be adjusted in a similar fashion
as the PostgreSQL adapter above.

Regards,
 Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to