Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bookSchema = new Schema({
- title: String,
- series: { type: Schema.Types.ObjectId, ref: 'Series' }
- });
- bookSchema.methods.fullTitle = function() {
- return [this.series.title, this.title].join(" - ");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement