db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Bengtson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JDO-274) JPOX doesnt support queries selecting just a parameter
Date Sat, 21 Jan 2006 16:03:44 GMT
    [ http://issues.apache.org/jira/browse/JDO-274?page=comments#action_12363516 ] 

Erik Bengtson commented on JDO-274:

1. The test should be extended to set values of different types. The basics Null, String and
Long values, a non persistent object as parameter, which would make difficult to execute the
query, and last, the test should also set a detached instance as parameter.

2. I agree with the expected result, but someone could ask why.

In SQL: SELECT  literal value from TABLE WHERE condition, if condition evaluates to true,
the literal is only one time in the result.

In JDOQL, that is not the case, so if condition evaluates to true, it will return N times
the literal for N instances that evaluated to true. Of course, if DISTINCT keyword it turns
to return 1 instance.

> JPOX doesnt support queries selecting just a parameter
> ------------------------------------------------------
>          Key: JDO-274
>          URL: http://issues.apache.org/jira/browse/JDO-274
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Andy Jefferson
>     Priority: Minor

> When a JDOQL query selects just a parameter, JPOX has a SELECT statement with no columns
selected resulting in a JDOUserException being thrown. This is demonstrated on TCK test
> org.apache.jdo.tck.query.result.ResultExpressions.testParameter
> [It has to be questioned why someone would want to create a JDOQL query of this form,
since they supply the value of the parameter in the first place ;-)]

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message