Note that there are some explanatory texts on larger screens.

plurals
  1. PORavenDB : A Simple Query<T>().ToList() returns 0 results
    text
    copied!<p>Im using RavenDB (in server mode running @localhost:3000), and ASP.NET MVC3 </p> <p>I have this code segment which stopped working from build 289. It did work couple of times before, not sure if it was the update to 322 or something I did.</p> <pre><code>Session.Query&lt;Post&gt;().ToList().ForEach(Session.Delete); </code></pre> <p>It was deleting all Posts when I tried a while back, (I only have around 50 odd posts in my sample data, and 500 more to come in) and only changes I can see is these two occurring at Runtime</p> <pre><code>A first chance exception of type 'System.Net.WebException' occurred in System.dll A first chance exception of type 'System.Net.WebException' occurred in Raven.Client.Lightweight.dll </code></pre> <p>And this log appears in the visual studio output window when the code segment (Session.Delete) above is actually running</p> <pre><code>Executing query '' on index 'dynamic/Posts' in 'http://localhost:3000' Query returned 0/0 results </code></pre> <p>And in Raven logs, (a text file) there is nothing untoward</p> <pre><code>Request # 7: GET - 46 ms - ZaszStore - 200 - /indexes/dynamic/Posts?query=&amp;start=0&amp;pageSize=128&amp;aggregation=None </code></pre> <p>This Query runs just fine :</p> <pre><code>Session.Load&lt;Post&gt;("MyPostId") </code></pre> <p>and fetches the correct Post Instance.</p> <p>Why is a simple Session.Query().ToList() returning 0 results all the time? And Session.Query().Count() returns 0 always. What could cause this behavior, considering the SilverLight-UI (SL-UI) of Raven DB clearly shows that there are 50-odd posts in the DB?</p> <p>The "Raven-Entity-Name" is correctly filled. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload