[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-916) SQLGrammarException when Using Oracle and Map Collection

Viktor Rees (JIRA) jira-events at lists.jboss.org
Fri Mar 16 08:56:32 EDT 2007


SQLGrammarException when Using Oracle and Map Collection
--------------------------------------------------------

                 Key: EJBTHREE-916
                 URL: http://jira.jboss.com/jira/browse/EJBTHREE-916
             Project: EJB 3.0
          Issue Type: Bug
    Affects Versions: EJB 3.0 RC9 - FD
         Environment: Oracle 9.2, Suse 9.1, JBoss 4.0.5, EJB3.0 RC9 (Error also occurs in RC7)
            Reporter: Viktor Rees


When using a Mapping like this with Oracle:

    @ManyToMany (cascade = CascadeType.ALL)
    @JoinTable(name = "T_TABLE_COLUMN", 
        joinColumns = { @JoinColumn(name = "tableName") }, 
        inverseJoinColumns = { @JoinColumn(name = "columnName") })
    @MapKey(name = "columnName")
    private Map<String,ColumnDef> columns;

Following SQLStatement produces an Oracle Error: ORA-00907: Rechte Klammer fehlt
"  ... select a1.columnName from ColumnDef as a1  ... "
The problem is is the 'as' keywort in the generated query. Oracle does not allow 'as'  for alias table names.

Deploying of the ear works fine. The problem occurs, when trying to access the object. If List instead of Map collection mapping is used all works fine.

There is a simple source code exmple and ear distributable in order to reproduce the bug. How can I attach or upload?



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list