
| Key: |
JDO-274
|
| Type: |
Bug
|
| Status: |
Resolved
|
| Resolution: |
Fixed
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Andy Jefferson
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
22/Jan/06 08:28 PM
|
|
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 ;-)]
|
|
Description
|
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 ;-)] |
Show » |
made changes - 22/Jan/06 08:28 PM
| Field |
Original Value |
New Value |
|
Resolution
|
|
Fixed
[ 1
]
|
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
|
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.