rethinkdb / horizon

Horizon is a realtime, open-source backend for JavaScript apps.
MIT License
6.78k stars 349 forks source link

FindAll not returning the expected result #826

Open KeKs0r opened 8 years ago

KeKs0r commented 8 years ago

Server version: 2.0.0 Client version: 2.0.0

I am experiencing a very weird behaviour with findAll. I am currently trying to deploy my horizon app.

So to make this easier, I have a local development setup and change my horizon server to either connect to my development or production rethinkdb server.

I am using the following query:

    const criteria = {question: 'dd76c5cd-ad57-5fb4-acd8-67eaf33d956e', status: 'STATUS_OPEN'};
    return hz('texts').findAll(criteria).limit(5)

The weird thing is that it returns a result for my development rethinkdb server, but not for my production one.

I have the following record on both servers:

{
"id":  "5241307" ,
"language":  "English" ,
"question":  "dd76c5cd-ad57-5fb4-acd8-67eaf33d956e" ,
"status":  "STATUS_OPEN" ,
"text":  "New products come out frequently and they meet the market requirements."
}

I also disabled permissions to make sure that its not due to that. In order to make sure that my user really has access to the collection I tried both those queries:

 hz('texts').findAll( {question: 'dd76c5cd-ad57-5fb4-acd8-67eaf33d956e'}).limit(5)
 hz('texts').findAll( "status":  "STATUS_OPEN" ).limit(5)

Both return the exact same resultset. Why is the result then with both criteria empty? And why is it working on my local rethinkdb server? (Both are version 2.3.5)