View Full Version : how to make a private store for each user(group)

25 Jan 2012, 3:06 AM
If we use syncstorage with the following model each app-user (our costomers) will have the same products.

If we want to have a private productlist for each app-user we could simply generate a new proxy-id for each user.

Is there a better way to do this?

How does Ext.io.user.getStore and findStores work? How to associate a store with a user?
http://docs.sencha.com/io/1-0/#!/api/Ext.io.User (http://docs.sencha.com/io/1-0/#%21/api/Ext.io.User)

Ext.define("products", {
extend: "Ext.data.Model",
fields: [
{name: 'id', type: 'int'},
proxy: {
type: 'syncstorage',
key: 'yoursenchaidname'
id: 'productsstore'

25 Jan 2012, 7:23 PM

Yes, the best way to have a per user database is to include a user identifier in the name of the store.