We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node_modules/feathers-mongoose/lib/transaction-manager.js (line 12): const client = context.app.get('mongoDbClient');
const client = context.app.get('mongoDbClient');
src/mongoose.js: app.set('mongooseClient', mongoose);
app.set('mongooseClient', mongoose);
We set 'mongooseClient' but get 'mongoDbClient'.
If I add app.set('mongoDbClient', mongoose); near app.set('mongooseClient', mongoose);
app.set('mongoDbClient', mongoose);
the error is gone.
const TransactionManager = require('feathers-mongoose').TransactionManager; const isTransactionEnable = process.env.TRANSACTION_ENABLE === "true" ? true : false; const skipPath = [ 'authentication' ];
const TransactionManager = require('feathers-mongoose').TransactionManager;
const isTransactionEnable = process.env.TRANSACTION_ENABLE === "true" ? true : false;
const skipPath = [ 'authentication' ];
and
module.exports = { before: { ... create: [ when(isTransactionEnable, async hook => TransactionManager.beginTransaction(hook, skipPath)), ...
module.exports = {
before: {
create: [
when(isTransactionEnable, async hook => TransactionManager.beginTransaction(hook, skipPath)),
TRANSACTION_ENABLE=true node src/
curl --request POST \ --url http://0.0.0.0:3030/people \ --header 'content-type: application/json' \ --data '[ { "name": "text" }, { "name": "text" } ]'
curl --request POST \
--url http://0.0.0.0:3030/people \
--header 'content-type: application/json' \
--data '[
{ "name": "text" },
{ "name": "text" }
]'
Transaction session starts success
{ "name": "GeneralError", "message": "Error while starting session TypeError: Cannot read property 'startSession' of undefined", "code": 500, "className": "general-error", "data": {}, "errors": {} }
Module versions (especially the part that's not working): "@feathersjs/feathers": "^3.3.1", "feathers-mongoose": "^7.3.1",
"@feathersjs/feathers": "^3.3.1",
"feathers-mongoose": "^7.3.1",
NodeJS version: v10.15.1
v10.15.1
Operating System: Linux 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Linux 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Browser Version:
React Native Version:
Module Loader:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
node_modules/feathers-mongoose/lib/transaction-manager.js (line 12):
const client = context.app.get('mongoDbClient');
src/mongoose.js:
app.set('mongooseClient', mongoose);
We set 'mongooseClient' but get 'mongoDbClient'.
If I add
app.set('mongoDbClient', mongoose);
near
app.set('mongooseClient', mongoose);
the error is gone.
Steps to reproduce
const TransactionManager = require('feathers-mongoose').TransactionManager;
const isTransactionEnable = process.env.TRANSACTION_ENABLE === "true" ? true : false;
const skipPath = [ 'authentication' ];
and
module.exports = {
before: {
...
create: [
when(isTransactionEnable, async hook => TransactionManager.beginTransaction(hook, skipPath)),
...
TRANSACTION_ENABLE=true node src/
curl --request POST \
--url http://0.0.0.0:3030/people \
--header 'content-type: application/json' \
--data '[
{ "name": "text" },
{ "name": "text" }
]'
Expected behavior
Transaction session starts success
Actual behavior
System configuration
Module versions (especially the part that's not working):
"@feathersjs/feathers": "^3.3.1",
"feathers-mongoose": "^7.3.1",
NodeJS version:
v10.15.1
Operating System:
Linux 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Browser Version:
React Native Version:
Module Loader:
The text was updated successfully, but these errors were encountered: