Jaydata : How To Migrate Code From V1.3 To V1.5
I have some code which worked in JayData 1.3. I need to upgrade JayData to 1.5 due to the compatibility issues the 1.3 version has with polymer. The upgrade instructions sa
Solution 1:
This is the updated snippet, I've just declared your entity definitions as variables as JayData stopped using global objects.
var Cache = data.Entity.extend('Cache', {
'id': { 'type': 'int', 'key': true, 'computed': true },
'url': { 'type': 'string' },
'method': { 'type': 'string', 'required': true },
'dts': { 'type': 'string', 'required': true },
'encryptMeth': { 'type': 'string' },
'data': { 'type': 'string' }
});
var APIWrapperDB = $data.EntityContext.extend('APIWrapperDB', {
'Cache': { 'type': $data.EntitySet, 'elementType': Cache }
});
var cacheDatabase = new APIWrapperDB('TheAPIWrapperDatabase');
cacheDatabase.onReady( function() { /* now my DB is ready */ };
Post a Comment for "Jaydata : How To Migrate Code From V1.3 To V1.5"