Could you please make your app link publick and send us that link
Could you please make your app link publick and send us that link
OK! Am trying it out. Thanks.
Will return soon.
Bravo! It works. Thank you, Marina!
Thank you, Marina.
Your advice works very well except in one case. Feeling hard to make of it, I conclude the question in four cases:
code
$.ajax ({..
data: encodeURI(whereClause),
/code
CASE 1 works
code
var whereClause = "where={'answer':'A'}"
/code
CASE 2 works
code
var whereClause = "where={'answer':{'$in':['A','B']}}"
/code
CASE3 also works
code
var whereClause = "where={'_id':'50efd89ee4b0195a923acbb2'}"
/code
CASE4 error 500 {"code":"undefined","description":"invalid ObjectId
code
var whereClause = "where={'_id':{'$in':
['50efd89ee4b0195a923acbb2','51026d83e4b0e330589c4770']}}"
/code
Why wouldn't CASE 4 work is beyond me. Could it be that the query is too long??
Anyone has any ideas on it?
Hello,
Looks like any expressions for _id are interpreted as ObjectId, that's why you cannot write expressions for _id
Hi,
But how does CASE 3 work, if no expression can be written for _id?
In case 3 you just pass _id and in case 4 there are some expressions for _id and as Katya said before they are interpreted as ObjectId (it's a bug)
So, do you see any way to get round this bug?
It needs to be fixed on server side... Seems there is no workaround.
I am having a similar problem with a multiple where clause when creating a database service. For example, I have two tables - 'US_States' and 'Stores'.
On my app I have two input fields, one to select the State (State_Label) and another to enter the store name (Store_Label).
I have linked the two tables by creating a pointer in the Store table that points to the State ID in the state table. So each Store record in the Stores table has a foreign key capturing which State it is in.
Now if I was to write a SQL query that will return all stores matching that store name in that state it would look something like this -
Select Store_Name from US_States, Stores where State_Label = US_States.State_Name AND Store_Label like Stores.Store_Name;
Could you please help in advising how to create a database service which would perform the same query