[英]Problem whith automigration Loopback 3 en oracle datasource
PS E:\\PROJECT\\LOOPBACK\\meetupz> node server/bin/automigration.js PS E:\\ PROJECT \\ LOOPBACK \\ meetupz>节点服务器/bin/automigration.js
CODE: 码:
var app = require('../server');
// this loads the accountDb configuration in ~/server/datasources.json
var dataSource = app.dataSources.db;
dataSource.automigrate('User', function(err) {
if (err) throw err;
dataSource.disconnect();
});
// this automigrates the model
dataSource.automigrate('meetup', function(err) {
if (err) throw err;
dataSource.disconnect();
});
RESULT: 结果:
Unhandled rejection Error: ORA-24422: error occurred while trying to destroy the Session 未处理的拒绝错误:ORA-24422:尝试破坏会话时发生错误
Please help 请帮忙
The solution is to make a single call to automigrate
and disconnect once. 解决方案是拨打一个电话即可automigrate
并断开一次连接。 https://loopback.io/doc/en/lb3/Creating-a-database-schema-from-models.html https://loopback.io/doc/en/lb3/Creating-a-database-schema-from-models.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.