Hi Rick,
I'm using OpenJPA 2.1, I've test with and without this property but the
result is the same.
Now things are getting odder...
I have a sample database with one root, 5 children, and each one has another
4 children (26 nodes)
2 - Root
10 - Node 1
15 - Node 1.1
16 - Node 1.2
17 - Node 1.3
18 - Node 1.4
11 - Node 2
(Nodes 19-22)
12 - Node 3
(Nodes 23-26)
13 - Node 4
(Nodes 27-30)
14 - Node 5
(Nodes 31-34)
This query
SELECT n FROM Node n
returns 26 objects. Correct.
But if I run this query more than once, opening and closing a fresh
EntityManager each time
SELECT n FROM Node n JOIN FETCH n.children
first time I get 6 objects, and the next ones returns 21:
First time:
Node[id=2]
Node[id=10]
Node[id=11]
Node[id=12]
Node[id=13]
Node[id=14]
Next ones:
Node[id=2]
Node[id=10]
Node[id=10]
Node[id=10]
Node[id=10]
Node[id=11]
Node[id=11]
Node[id=11]
Node[id=11]
Node[id=12]
Node[id=12]
Node[id=12]
Node[id=12]
Node[id=13]
Node[id=13]
Node[id=13]
Node[id=13]
Node[id=14]
Node[id=14]
Node[id=14]
Node[id=14]
Now is weirder because none of the queries returns all the rows of the
database. I don't understand why the result lists are different, and why the
third level is not loaded...
Thanks.
--
View this message in context:
http://openjpa.208410.n2.nabble.com/Same-JPQL-different-results-tp6317274p6317642.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.