r.table('Chatroom_user').changes().run().then()
Chatroom
and User
have a hasAndBelongsToMany
relationship
Hello I am getting a rethinkdb error when I run an addRelation this is the console log output :
{ changes: [],
deleted: 0,
errors: 1,
first_error: 'Expected type DATUM but found SEQUENCE:\nVALUE SEQUENCE',
inserted: 0,
replaced: 0,
skipped: 0,
unchanged: 0 }
and the error that came with it:Unhandled rejection InvalidWriteError: An error occurred during the write
Entering slow growth mode
Fail to create a new connection for the connection pool. Error:{"msg":"Failed to connect to MY REMOTE DATABASE in less than 20s","message":"Failed to connect to MY REMOTE DATABASE in less than 20s.","isOperational":true}
ServiceDescriptor.filter((service) => {
return thinky.r.expr(serviceTypes).contains(service("type"));
}).changes()
We've just get our hands on thinky and we can't understand some error with bluebird : Unhandled rejection TypeError: net.isIPv6 is not a function
We're using thinky with react if that's of any help, and the rethinkDB SGBD is running inside a docker.
Do anyone know what's happening ?
function populateOrganizations() {
dbOrganizations.organization.forEach(result => {
const organization = new Organization(result);
organization.save();
});
}
function populateOrganizations() {
const operations = dbOrganizations.organization.map(result => {
const organization = new Organization(result);
return organization.save();
});
return Promise.all(operations);
}
.pre('save')
? My worry with .pre('save')
was that I thought it did not work with updates