[jira] Commented: (JDO-241) JPOX returns wrong query result for non-extent queries.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > [jira] Commented: (JDO-241) JPOX returns wrong query result for non-extent queries.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Commented: (JDO-241) JPOX returns wrong query result for non-extent queries.  
Andy Jefferson (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-20-05 10:45 PM

[ http://issues.apache.org/jira/brows...ments#action_1=
2360949 ]=20

Andy Jefferson commented on JDO-241:
------------------------------------

Hmmmm. You call setCandidates() and pass in the same object twice and so yo=
u expect the query to return dups ? Sounds unintuitive to me. The query spe=
cifies that some object is a candidate for being returned (twice) and that,=
to me at least, means that we allow the selected candidates be part of the=
result - and the object is part of the result. The basic query says return=
all Person objects. I see "candidates" as a further filter only ... not so=
me way of saying "return me the same thing twice, or three times depending =
on how many times I put it in my candidates list".

> JPOX returns wrong query result for non-extent queries.
> -------------------------------------------------------
>
>          Key: JDO-241
>          URL: http://issues.apache.org/jira/browse/JDO-241
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Michael Watzek
>     Assignee: Erik Bengtson
>  Attachments: JDO-241.patch
>
> Test case DistinctCandidateInstances fails because JPOX returns an empty =
collection for the query below. The query uses a candidate collection.
> 14:22:46,781 (main) DEBUG [org.apache.jdo.tck] - Executing JDO query: SEL=[/vb
col]
ECT FROM org.apache.jdo.tck.pc.company.Person[vbcol=seagreen]
> 14:22:46,796 (main) DEBUG [org.apache.jdo.tck] - Query result: []
> 14:22:46,812 (main) DEBUG [org.apache.jdo.tck] - Wrong query result:=2
0
> expected: [FullTimeEmployee(1, emp1Last, emp1First, born 10/Jun/1970, pho=[/vb
col]
ne {work=3D123456-1, home=3D1111}, hired 1/Jan/1999, weeklyhours 40.0, 
$200=
00.0), FullTimeEmployee(2, emp2Last, emp2First, born 22/Dec/1975, phone 
3;wo=
rk=3D123456-2, home=3D2222}, hired 1/Jul/2003, weeklyhours 40.0, $10000.0),=
PartTimeEmployee(3, emp3Last, emp3First, born 5/Sep/1972, phone {work=3
D12=
3456-3, home=3D3333}, hired 15/Aug/2002, weeklyhours 19.0, $15000.0), PartT=
imeEmployee(4, emp4Last, emp4First, born 6/Sep/1973, phone {work=3D1244
56-3=
, home=3D3343}, hired 15/Apr/2001, weeklyhours 0.0, $13000.0), FullTimeEmpl=
oyee(5, emp5Last, emp5First, born 5/Jul/1962, phone {work=3D126456-3, h
ome=
=3D3363}, hired 15/Aug/1998, weeklyhours 0.0, $45000.0), FullTimeEmployee(1=
, emp1Last, emp1First, born 10/Jun/1970, phone {work=3D123456-1, home=3
D111=
1}, hired 1/Jan/1999, weeklyhours 40.0, $20000.0), FullTimeEmployee(2, emp2=
Last, emp2First, born 22/Dec/1975, phone {work=3D123456-2, home=3D2222}
, hi=
red 1/Jul/2003, weeklyhours 40.0, $10000.0), PartTimeEmployee(3, emp3Last, =
emp3First, born 5/Sep/1972, phone {work=3D123456-3, home=3D3333}, hired
 15/=
Aug/2002, weeklyhours 19.0, $15000.0), PartTimeEmployee(4, emp4Last, emp4Fi=
rst, born 6/Sep/1973, phone {work=3D124456-3, home=3D3343}, hired 15/Ap
r/20=
01, weeklyhours 0.0, $13000.0), FullTimeEmployee(5, emp5Last, emp5First, bo=
rn 5/Jul/1962, phone {work=3D126456-3, home=3D3363}, hired 15/Aug/1998,
 wee=
klyhours 0.0, $45000.0)][vbcol=seagreen]
> got:      []
> 14:22:46,812 (main) INFO  [org.apache.jdo.tck] - Exception during setUp o=[/vb
col]
r runtest:=20[vbcol=seagreen]
> junit.framework.AssertionFailedError: Assertion A14.6.9-2 (DistintCandida=
teInstances) failed:=20
> Wrong query result:=20
> expected: [FullTimeEmployee(1, emp1Last, emp1First, born 10/Jun/1970, pho=[/vb
col]
ne {work=3D123456-1, home=3D1111}, hired 1/Jan/1999, weeklyhours 40.0, 
$200=
00.0), FullTimeEmployee(2, emp2Last, emp2First, born 22/Dec/1975, phone 
3;wo=
rk=3D123456-2, home=3D2222}, hired 1/Jul/2003, weeklyhours 40.0, $10000.0),=
PartTimeEmployee(3, emp3Last, emp3First, born 5/Sep/1972, phone {work=3
D12=
3456-3, home=3D3333}, hired 15/Aug/2002, weeklyhours 19.0, $15000.0), PartT=
imeEmployee(4, emp4Last, emp4First, born 6/Sep/1973, phone {work=3D1244
56-3=
, home=3D3343}, hired 15/Apr/2001, weeklyhours 0.0, $13000.0), FullTimeEmpl=
oyee(5, emp5Last, emp5First, born 5/Jul/1962, phone {work=3D126456-3, h
ome=
=3D3363}, hired 15/Aug/1998, weeklyhours 0.0, $45000.0), FullTimeEmployee(1=
, emp1Last, emp1First, born 10/Jun/1970, phone {work=3D123456-1, home=3
D111=
1}, hired 1/Jan/1999, weeklyhours 40.0, $20000.0), FullTimeEmployee(2, emp2=
Last, emp2First, born 22/Dec/1975, phone {work=3D123456-2, home=3D2222}
, hi=
red 1/Jul/2003, weeklyhours 40.0, $10000.0), PartTimeEmployee(3, emp3Last, =
emp3First, born 5/Sep/1972, phone {work=3D123456-3, home=3D3333}, hired
 15/=
Aug/2002, weeklyhours 19.0, $15000.0), PartTimeEmployee(4, emp4Last, emp4Fi=
rst, born 6/Sep/1973, phone {work=3D124456-3, home=3D3343}, hired 15/Ap
r/20=
01, weeklyhours 0.0, $13000.0), FullTimeEmployee(5, emp5Last, emp5First, bo=
rn 5/Jul/1962, phone {work=3D126456-3, home=3D3363}, hired 15/Aug/1998,
 wee=
klyhours 0.0, $45000.0)][vbcol=seagreen]
> got:      []
> =09at junit.framework.Assert.fail(Assert.java:47)
> =09at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:546)
> =09at org.apache.jdo.tck.query.QueryTest.queryFailed(QueryTest.java:500)
> =09at org.apache.jdo.tck.query.QueryTest.checkQueryResultWithoutOrder(Que=
ryTest.java:485)
> =09at org.apache.jdo.tck.query.QueryTest.execute(QueryTest.java:1189)
> =09at org.apache.jdo.tck.query.QueryTest.executeJDOQuery(QueryTest.java:1=
057)
> =09at org.apache.jdo.tck.query.result.DistinctCandidateInstances.testColl=
 ectionQueries(DistinctCandidateInstances
.java:129)
> =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp=
l.java:39)
> =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc=
essorImpl.java:25)
> =09at java.lang.reflect.Method.invoke(Method.java:324)
> =09at junit.framework.TestCase.runTest(TestCase.java:154)
> =09at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:204)
> =09at junit.framework.TestResult$1.protect(TestResult.java:106)
> =09at junit.framework.TestResult.runProtected(TestResult.java:124)
> =09at junit.framework.TestResult.run(TestResult.java:109)
> =09at junit.framework.TestCase.run(TestCase.java:118)
> =09at junit.framework.TestSuite.runTest(TestSuite.java:208)
> =09at junit.framework.TestSuite.run(TestSuite.java:203)
> =09at junit.framework.TestSuite.runTest(TestSuite.java:208)
> =09at junit.framework.TestSuite.run(TestSuite.java:203)
> =09at junit.textui.TestRunner.doRun(TestRunner.java:116)
> =09at junit.textui.TestRunner.doRun(TestRunner.java:109)
> =09at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:=
120)
> =09at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:9=
5)

--=20
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:59 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register