Comments (8)
can you share the module with your Schema
definitions?
from stream-node-orm.
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.
@matthisk ^^^^^
from stream-node-orm.
Any answers ?
from stream-node-orm.
I have the same issue, have anyone a clue?
from stream-node-orm.
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.
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.
Thanks all – apologies for the delay. This is is now resolved.
from stream-node-orm.
Related Issues (20)
- Cannot find module 'mongoose' HOT 2
- newsFeeds[slug].follow is not a function HOT 14
- API keys not accessible from getstream.js file HOT 2
- Add backend as a configuration option
- Load selected backend only
- Initiate FeedManager with a configuration object
- Compatibility with Koa2 and RethinkDB?
- Is it possible to add tags to a post using this orm package?
- Errors unhandled in ORM HOT 1
- Node 10? HOT 3
- Actor prop author not found on model instance
- TypeScript / TypeORM Support
- require('getstream-node') throws exception HOT 2
- Breaking changes on getstream-js dependency HOT 1
- Custom config file directory is not working HOT 2
- STREAM_URL HOT 1
- Package still use getstream 5.0.0
- Support Async Configuration for Managed Secrets
- TypeError: instance.createActivity is not a function
- Is this package now deprecated in favour of stream-js? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stream-node-orm.