[
http://jira.jboss.com/jira/browse/EJBTHREE-916?page=all ]
Viktor Rees updated EJBTHREE-916:
---------------------------------
Attachment: EJBTHREE_916.zip
persistence.xml:
./ejb/src/main/resources/META-INF/persistence.xml
Example:
./ejb/src/main/java/de/web/mf/sample/entity/*.java
How to Test:
1.) Deploy ear file: ./ear/target/SampleEJB3-ear-1.0-SNAPSHOT.ear
2.) Go to jmx console:
http://server:port/jmx-console
3.) Select media.services.tgp --> service=SampleMBean
4.) Invoke MBean operation: void storeSampleList()
5.) See JBoss server log
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
Attachments: EJBTHREE_916.zip
Original Estimate: 2 hours
Remaining Estimate: 2 hours
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