【发布时间】:2017-01-26 22:22:33
【问题描述】:
我有一些在 JayData 1.3 中工作的代码。
由于 1.3 版本与聚合物的兼容性问题,我需要将 JayData 升级到 1.5。
upgrade instructions 说您可以使用“jaydata-compatibility.js”脚本“将您的应用程序从以前的版本逐步升级到 JayData 1.5.x”,但是当我按照描述添加它时,我只是得到了错误,“typeOrName requires a value other than undefined or null”,实际上根本无法帮助我逐步完成升级。
这里是 JayData 1.3 代码:
$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' }
});
$data.EntityContext.extend('APIWrapperDB', {
'Cache': { 'type': $data.EntitySet, 'elementType': Cache }
});
var cacheDatabase = new APIWrapperDB('TheAPIWrapperDatabase');
cacheDatabase.onReady( function() { /* now my DB is ready */ };
此代码的 JayData 1.5 等效项是什么?
【问题讨论】:
标签: javascript polymer jaydata