Bug 247 : Regression with subquery
Priority 
High
Reported Version 
 
Logged By 
imario
Status 
Fixed
Fixed Version 
2.5.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
16/03/2010
Updated 
16/03/2010
Type 
Bug
 
Attachments 
No attachments

During the upgrade of our application to the latest ebean I've found are regression bug.

I've committed the TestSubQuery.testCompositeKey test (commented in source) which demonstrates the problem.

The test case generates a query which looks like this:

select c.one_key c0, c.two_key c1, c.name c2, c.version c3, c.assoc_id c4
from ckey_parent c
where (c.one_key) in (select c.one_key c0, c.two_key c1, c.one_key c2, c.two_key c3 from ckey_parent c)

Abviously this will fail as the fields in the where clause do not match the fields of the subselect.

There is a difference to the exception in our application which I can not explain yet. In this example the whole primary key is repeated twice, in our application the primary key appears just once.
Anyway, in both cases the configuration made with query.select() is ignored.

 
Rob 17 Mar 06:08
Issue in OrmQueryRequest.isQubQuery()

We now have an explicit SUBQUERY query type.

Fixed in HEAD.

woResponse

Upload a file