Coder Social home page Coder Social logo

Comments (8)

tbarbugli avatar tbarbugli commented on June 2, 2024

can you share the module with your Schema definitions?

from stream-node-orm.

suhairelayadath avatar suhairelayadath commented on June 2, 2024

Yes, This is the schema and models i have used.

var mongoose = require('mongoose');
var stream  = require('getstream-node');

console.warn("We have imported stream ", stream.mongoose.activity);

// Define the schema
var userSchema = new mongoose.Schema({
    _id: String,
    email: String,
    uid: String
});

var beatSchema = new mongoose.Schema({
    content: String,
    user: {
        type: mongoose.Schema.Types.String,
        ref: 'User'
    }
});

// Compile the schema into models
var User = mongoose.model('User', userSchema);
var Beat = mongoose.model('Beat', beatSchema);


mongoose.connect('...');


beatSchema.plugin(stream.mongoose.activity);

stream.mongoose.setupMongoose(mongoose);

from stream-node-orm.

tbarbugli avatar tbarbugli commented on June 2, 2024

@matthisk ^^^^^

from stream-node-orm.

Martindelataille avatar Martindelataille commented on June 2, 2024

Any answers ?

from stream-node-orm.

RicardoFazzi avatar RicardoFazzi commented on June 2, 2024

I have the same issue, have anyone a clue?

from stream-node-orm.

beegalayuvraj avatar beegalayuvraj commented on June 2, 2024

var stream = require('../index.js')

add this line to mongoose js file. stream is undefined variable and we need to load it.

from stream-node-orm.

ntemirov avatar ntemirov commented on June 2, 2024

Guys, any updates for this issue in the repo? Please, add var stream = require('../index.js'); to src/backends/mongoose.js file.

from stream-node-orm.

astrotars avatar astrotars commented on June 2, 2024

Thanks all – apologies for the delay. This is is now resolved.

from stream-node-orm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.