openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <>
Subject [jira] Resolved: (OPENJPA-269) Informix doesn't support subselects or using table aliases in a delete statement.
Date Wed, 27 Jun 2007 18:39:25 GMT


Michael Dick resolved OPENJPA-269.

       Resolution: Fixed
    Fix Version/s: 1.0.0
         Assignee: Michael Dick

> Informix doesn't support subselects or using table aliases in a delete statement. 
> ----------------------------------------------------------------------------------
>                 Key: OPENJPA-269
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Michael Dick
>            Assignee: Michael Dick
>             Fix For: 1.0.0
> Informix doesn't support using table aliases in a delete statement if you have an index
on the table.  For example if we issue the SQL statement : 
> "delete from quoteejb t0" a Syntax error will be thrown by the Informix JDBC driver.
Whereas "delete from quoteejb" would work. 
> This problem seems to be fixed by setting allowAliasInBulkClause to false in InformixDBDictionary.
Another possibility is to check whether there is an index on the table, if no index is present
we should be able to use the alias. I haven't verified whether that approach works though.

> A second problem occurred when we tried to issue the following statement : 
> DELETE FROM holdingejb WHERE holdingID IN (SELECT DISTINCT t0.holdingID FROM holdingejb
> The second problem was resolved by setting supportsSubselect to false in InformixDBDictionary.

> In the current implementation when supportsSubselect is false we never check allowAliasInBulkClause
so the first change might not be necessary. If the implementation changes we might run into
the problem again, so I'd prefer to change both variables.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message