Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use Lawnchair with more than one table?

I am trying to use Lawnchair (http://westcoastlogic.com/lawnchair/) for a mobile project to store information about different things. I need to store in more than more table.

var people = new Lawnchair('people');

var groups = new Lawnchair('groups');

This does not completely work, it tries to copy contents from the people table to the group table. I have tried setting people.adapter.table on the fly which also results in a similar issue. I'm beginning to think it is not possible to have more than one table with Lawnchair..

Any help?

like image 580
gmreburn Avatar asked Jan 21 '23 02:01

gmreburn


1 Answers

You should set the 'name' option on your Lawnchair instances:

var people = new Lawnchair({name: "people"}, function(){});

var groups = new Lawnchair({name: "groups"}, function(){});

-Marc

like image 162
Marc Temanson Avatar answered Jan 31 '23 02:01

Marc Temanson