db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: [jira] Commented: (JDO-274) JPOX doesnt support queries selecting just a parameter
Date Sat, 21 Jan 2006 17:45:54 GMT
Hi Erik,

I can't think of a good use case for SELECT  literal value from Class  
WHERE condition. As far as I can think, this is simply a matter of  
completeness. An important one, because if we disallow it  there is a  
lot more work to do to restrict the case and to specify the behavior  
in case the user does use this case.

So I'm not as interested in adding more test cases. If this is your  
itch, I'm happy to encourage you to scratch it, but I don't think  
it's our highest priority right now.

Thanks,

Craig

On Jan 21, 2006, at 8:03 AM, Erik Bengtson (JIRA) wrote:

>     [ 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:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message