persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
also: i'm writting one java servlet for server component that responds to multiples types of entites the uri has a parameter for the entity name but the client /getUpdates?entity=Task, so i suggest the call in synchronize to be :
lines 184 and 185 throws group var undefined:
also: i'm writting one java servlet for server component that responds to multiples types of entites the uri has a parameter for the entity name but the client /getUpdates?entity=Task, so i suggest the call in synchronize to be :
persistence.sync.getJSON(uri + (uri.indexOf("?")==-1 ? "?" : "&") + 'since=' + lastServerSyncTime, function(result) ...
the same applies to encodeUrlObj:
function encodeUrlObj(uri,obj) { var parts = []; for(var k in obj) { if(obj.hasOwnProperty(k)) { parts.push(encodeURI(k)+"="+encodeURI(obj[k])); } } return (uri.indexOf("?")==-1 ? "?" : "&") + parts.join("&"); }
thank you