You need to sign in to do that
Don't have an account?
juhana
SmartStore joined/nested queries ?
Hi,
I'm using SmartStore in hybrid offline development. In online mode, I can do queries like:
Select Id,(select Id from Events),(select Id from Contacts) from Account
But how to do this with SmartStore using smart queries ?
sample app. This demonstrates the syntax of smart SQL and how to perform
complex aggregate queries similar to the query you mentioned.
--
Sent from my iPhone
Does not work, even SmartSql is formed and queried, SmartSync.js crashes. Is this query right or not ?
Also tried query only the Id fields but still the same error.
I'm assuming "accounts" and "events" are your table names? Is "_soup" your field name? Assuming you're querying the "Id" field from both these tables, where the "Id" value matches, the query would look like:
I am using mobile SDK 2.1 and I am extending the AccountEditor application.
I am trying to run a smartQuery to get from Offline Smartstore all the contacts of that partirocal Account. I arrive to run the following smartQuery:
smartSql = "SELECT {contacts:_soup} FROM {contacts} WHERE {contacts:Account.Id} IN ( '001E000000Hl5XEIAZ') ORDER BY LOWER({contacts:Id})";
Here is the fieldlist of my contact Collection Model: fieldlist: ["Id","Account.Id","FirstName","LastName", "Phone", "Email","Birthdate","Owner.Name", "LastModifiedBy.Name", "LastModifiedDate"],
Only thing I get on the console is: ------> Calling errorCB for smartstoreClient:runSmartQuery.
If I change the contacts:Account.Id with other contact fields like contacts:FirstName, I don't get the error any more, but Of course I don't obtain the result I want.
Start to think that I can't use the Parent Id field (Account.Id in this case) in the Model Object.
Please help
Thanks
Maurizio.