0

I have started to use Stackmob as a backend for a simple app I am building.

In stackmob I have set a relationship between two schema's and want to use '.fetchExpanded' to grab all of the data from stackmob, see this fiddle (will need to view the console to see the output):

http://jsfiddle.net/mcneela86/65Rax/

.fetchExtended(1);

The same code works using the '.fetch' instead of '.fetchExpanded'.

Has anyone come across this before?

Would really appreciate any help.

mcneela86
  • 1,029
  • 3
  • 18
  • 35

1 Answers1

0

Ok, I found a work around for this.

Instead of using '.fetchExtended(1);' I will just use '.fetch();' and when I am defining the model I will change the following:

var Bike = StackMob.Model.extend({
    schemaName: "bikes"
});

to:

var Bike = StackMob.Model.extend({
    schemaName: "bikes?_expand=1"
});

This seems to remove the need for '.fetchExtended(1);'

Hope this helps someone else.

mcneela86
  • 1,029
  • 3
  • 18
  • 35