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.
We now have an explicit SUBQUERY query type.
Fixed in HEAD.