Mantis - Resin
Viewing Issue Advanced Details
393 minor always 09-21-05 00:00 11-30-05 14:42
user241  
 
urgent  
closed 3.0.14  
3.0.14 fixed  
none    
none 3.0.15  
0000393: can't traverse many-to-one paths in amber (resin 3) ejb-ql
RSN-439
Given the following ejb-ql:

SELECT a FROM schemaA a, IN (a.schemaB) b where b = ?1

if a has a many-to-one relationship with b then the query dies with the following error:

com.caucho.amber.query.QueryParseException: collections in FROM may not be sub-collected. in "SELECT a FROM schemaA a, IN(a.schemaB) b WHERE b = ?1" at com.caucho.amber.query.QueryParser.error(QueryParser.java:1490) at com.caucho.amber.query.CollectionSchemaExpr.createField(CollectionSchemaExpr.java:65) at com.caucho.amber.query.QueryParser.parseSchema(QueryParser.java:671) at com.caucho.amber.query.QueryParser.parseFrom(QueryParser.java:518) at com.caucho.amber.query.QueryParser.parseSelect(QueryParser.java:264) at com.caucho.amber.query.QueryParser.parse(QueryParser.java:239) at com.caucho.amber.connection.AmberConnectionImpl.parseQuery(AmberConnectionImpl.java:963) at

I have traced this through the source and this error ("collections in FROM may not be sub-collected") is hardcoded into CollectionSchemaExpr.java. It looks like the coding was simply never finished. So an ejb query can no longer traverse a many-to-one path anymore, which pretty much makes the IN clause of ejb-sql useless. In resin 2, the join was created easily and works.

Can you get this completed and into 3.0.15???

cheers
christian

resin 3.x pro. all platforms.

Notes
(0000450)
ferg   
09-21-05 00:00   
ejb/0h18