Multi table queries using Azure Mobile Services and android
android, azure
Solution
I don't know if this is supported, but to create a view and have access to it through mobile services you would first need to create the object as a table from the Azure portal, then use sp_rename in the database to rename your table [servicename].[tablename] to [servicename].[tablename2], and finally create a view called [servicename].[tablename]. I tested this and it seems to work. This is how to change the ToDoItem table into a view from the sample program provided by Microsoft:
sp_rename [enzotest.todoitem], [todoitem2]
CREATE VIEW enzotest.todoitem WITH SCHEMABINDING AS SELECT id, [text], complete FROM enzotest.todoitem2
You do not need to have SCHEMABINDING in place, but it helps manage the object from the portal. Now that you have a view, you should be able to easily join to other tables.
Problem
I am testing out the Azure Mobile Services facility with an Android App. For single table CRUD operations it works very well, but I have been unable to find any documentation or examples on multi-table queries. Has anyone seen anything on this front - either for doing something server side (say creating views) or on the android device? thanks anton