Error: parent cluster object has been closed
See original GitHub issueHi, im new with ottoman, i try to call model findOne() Here is my model declare: `import { model, Ottoman, Schema } from ‘ottoman’ import { KEY_GENERATOR, PRICING_MODELS } from ‘…/…/consts’
const ottoman = new Ottoman() ottoman.connect('couchbase://****)
export const PriceSchema = new Schema({ propertyId: { type: String, required: true }, roomId: { type: String, required: true }, agreementId: { type: String, required: true }, rateId: { type: String, required: true }, rateType: { type: String, required: true }, allotment: Number, price: { type: Number, required: true }, isActive: { type: Boolean, required: true }, status: String, date: { type: String, required: true }, })
export const PriceModel = model(PRICING_MODELS.PRICE, PriceSchema, { collectionName: ‘prices’, keyGenerator: KEY_GENERATOR, })`
and
const test = await PriceModel.findOne() console.log(test)
But i got error: Error: parent cluster object has been closed. Please tell me why? Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (10 by maintainers)
Top GitHub Comments
I just want to thank you all for this thread, in the last 24 hours I decided to create my own new ORM package, highly inspired by
node-ottoman
https://github.com/stoqey/sofaThings make more sense now 🤘🏿🙏🍾
Please don’t hesitate to throw some feedback on it
Thank you very much again
@gsi-alejandro thank you so much