Andy Malakov wrote:

I will add a test for this bug, how can we reproduce the NPE, how does
the query look like?

Here it is. May be you will spot something wrong in it:

SELECT * FROM USERS WHERE PK IN (
   SELECT USER_FK
   FROM ITEMS
   WHERE RETURN_DATE BETWEEN yesterday AND tomorrow
)

Criteria innerCriteria = new Criteria ();
innerCriteria.addBetween("returnDate", YESTERDAY, TOMORROW );
ReportQueryByCriteria innerQuery = QueryFactory.newReportQuery (Item.class,
innerCriteria);
innerQuery.setAttributes (new String [] { "userFk" });

Criteria outerCriteria = new Criteria ();
outerCriteria.addIn ("pk", innerQuery);
QueryByCriteria outerQuery = QueryFactory.newQuery (User.class,
outerCriteria);

where Item is abstract class with extent.

Armin, I will send you entire test case by personal mail.
Andy, if you want to contribute the tescase, please add the code as an attachment to a JIRA issue. It is the way to go if you want to contribute code for legal reasons. ;-)


Best Regards,

Antonio Gallardo.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to