Hi,
I'm new to the usage of future queries, but from my understanding, is that if you use future instead of issuing the query right away, you can batch the queries. Thereby saving roundtrips to the database.
But, i have a issue where i get undeterministic results, when doing this. It doesn't get the same results, if i loop the same 2 future queries twice.
1 of the future queries is missing a result, but if i debug the code, and let it do the queries twice, it returns correct.
This is how the code looks:
Issue Future Query 1 Issue Future Query 2 Iterate result from Query 1 Iterate result from Query 2( A resultset is missing, 6 out of 7 returned.)
now drag the pointer in debugger to "Issue Future Query 1" and it runs the same code but returns the correct result from the database.
If i do the same thing, without futures, it behaves correctly.
The sql generated is correct with futures, returns the correct results, but nhibernate somehow doesnt create the complete list of objects.
Is this a bug??? Me that misunderstands or oversee something.
Regards, Casper Skydt
|