FAQ

Search Discussions

54 discussions - 168 posts

  • After lots of web diving, I'm under the impression that prefixing collection names would be the most secure and performant multi-tenancy strategy for mongodb -- but I've been wrong many times before. ...
    KrutKrut
    Mar 9, 2012 at 12:35 pm
    Jul 21, 2013 at 9:44 pm
  • I have the following schemas defined: InvoiceItems = new Schema({ 'transaction' : {type: Schema.ObjectId,ref: 'Transaction'}, }); Invoice = new Schema({ 'items' : {type : [InvoiceItems]} }); Partner ...
    TylerSTylerS
    Mar 18, 2012 at 6:54 am
    Mar 21, 2012 at 2:14 am
  • I'm building an application with "Groups" and "Projects" in which a "Project" belongs to a group. I am trying to denormalize the group name into the project schema so that I can display the group ...
    Scott NelsonScott Nelson
    Mar 9, 2012 at 5:52 pm
    Mar 10, 2012 at 1:22 am
  • I have multiple instance methods on a UserModel and use them throughout the code, but I found that I can't call an instance method from within another instance method. Is this by design or am I doing ...
    Greg TracyGreg Tracy
    Mar 2, 2012 at 11:14 pm
    Jun 17, 2012 at 12:30 pm
  • Is there a way to specify the collection field name in a schema? The long descriptive field names in code are helpful but are starting to eat up bytes on our small VPS. -- http://mongoosejs.com ...
    MgutzMgutz
    Mar 26, 2012 at 3:05 pm
    Mar 30, 2012 at 2:24 pm
  • Hi all :) I'm new to this group as for Mongoose programming, but I can already say I'm delighted for its flexibility :) So, here's a question that got me stuck: I'm building a simple schema for ...
    Richard KuestersRichard Kuesters
    Mar 11, 2012 at 11:53 am
    Apr 14, 2012 at 4:12 pm
  • Hi all, And thanks for the great ORM. I've been using Mongoose a lot lately, especially Map/Reduce, and I wanted to share the result with you guys. The project is called Uptime, it's a website ...
    Francois ZaninottoFrancois Zaninotto
    Mar 28, 2012 at 7:41 pm
    Apr 3, 2012 at 4:27 pm
  • Hi, I am currently trying to load and add additional fields to a Mongoose document after creation. I load a document from the database, skipping some fields which contain embedded documents. At a ...
    Daniel BauligDaniel Baulig
    Mar 25, 2012 at 4:52 pm
    Mar 28, 2012 at 7:49 pm
  • How can I get the id of a freshly upserted item? Currently update with {upsert: true} gives me no indicator other than how many items were updated. The info should be available when in {safe: true} ...
    Tim OxleyTim Oxley
    Mar 20, 2012 at 5:20 am
    Mar 25, 2013 at 9:10 pm
  • with a freshly upgraded mongo server, on a new schema, i get this when i try to add additional users: MongoError: E11000 duplicate key error index: test.users.$user_1 dup key: { : null } at [object ...
    Shawn wilsonShawn wilson
    Mar 30, 2012 at 8:37 pm
    Mar 31, 2012 at 8:40 pm
  • I haven't thought this through, but I want to put it out there before I forget. My brain is leaky like that. Please disabuse me of any misconceptions I betray below. Okay. So, when you get a doc with ...
    Dan MacToughDan MacTough
    Mar 9, 2012 at 3:49 pm
    Aug 21, 2012 at 5:56 pm
  • I have a User.name.full virtual (like on http://mongoosejs.com/docs/virtuals.html), and an Item schema that includes a reference to User: https://gist.github.com/2204602 When I try to populate User, ...
    Marvin TamMarvin Tam
    Mar 26, 2012 at 2:00 pm
    Mar 27, 2012 at 11:15 am
  • Hi there, I have a little problem, to get data from my database. For example i have model: var PostSchema = new mongoose.Schema({ title: String, body: String, comments: [ CommentSchema ] }); var ...
    AndrzejAndrzej
    Mar 22, 2012 at 5:51 pm
    Mar 23, 2012 at 7:02 pm
  • I'm using a Number type for a price. I want users to be able to use a comma or period in the input but strip it before entering. Mongoose gives a cast error if a comma is included. When I do a setter ...
    EltoroEltoro
    Mar 31, 2012 at 4:43 pm
    Apr 4, 2012 at 2:32 am
  • Hi, schema.pre('save', function (next) { // something goes wrong next(new Error('something went wrong')); }); myModel.save(function (err) { // err can come from a middleware }); pre save handler ...
    Yo12Yo12
    Mar 15, 2012 at 6:40 pm
    Mar 20, 2012 at 1:48 pm
  • I have a virtual attribute used to has a password: Users.virtual('password') .get(function() { return this._password; }) .set(function (value) { this._password = value; var salt = ...
    EltoroEltoro
    Mar 14, 2012 at 4:16 pm
    Mar 14, 2012 at 9:54 pm
  • Bump... Has anyone achive that in version 2.5.x? -- http://mongoosejs.com http://github.com/learnboost/mongoose You received this message because you are subscribed to the Google Groups "Mongoose ...
    Láďa ŘíhaLáďa Říha
    Mar 4, 2012 at 6:06 pm
    Jul 30, 2012 at 5:44 pm
  • With a new version of the app I'm writing, I am shifting the underlying structure of my collection to break out some of the data currently contained in an array to a separate collection within ...
    ChrisChris
    Mar 30, 2012 at 1:41 pm
    Mar 30, 2012 at 7:34 pm
  • Hi All, I'm working on another module that is part of one of my paid projects to create an ElasticSearch plugin for mongoose and I've been wondering about conventions I should try to follow ...
    James CarrJames Carr
    Mar 30, 2012 at 4:39 pm
    Mar 30, 2012 at 4:59 pm
  • Hi there, I have a performance related question. A simple test run on my machine shows about 1900 writes per second using Mongoose ODM meanwhile mongodb-native-driver gives about 4000 records per ...
    NabNab
    Mar 26, 2012 at 3:05 pm
    Mar 26, 2012 at 7:19 pm
  • How can I define a schema with a father that is of the same type. IE: var Person = new Schema({ name: String, father: Person, children: [Person] }); This doesn't work since Person isn't defined at ...
    Iain MackayIain Mackay
    Mar 16, 2012 at 7:08 pm
    Mar 17, 2012 at 5:21 pm
  • Hi, I have been using mongoose lately and am really liking it. However, I have been having problems and couldn't find what is the cause or a feasible solution. (I am sure it is pretty trivial) This ...
    Murat T.Murat T.
    Mar 13, 2012 at 7:53 pm
    Mar 14, 2012 at 8:45 pm
  • I have an application where it looks like my connections are increasing each time the page loads. For example, ill run this command to see the connections 'lsof | grep mongod | grep TCP' and then ...
    James C.James C.
    Mar 12, 2012 at 2:29 am
    Mar 14, 2012 at 11:16 am
  • Assume node and MongoDB are running and node has acquired a connection to MongoDB via Mongoose (i.e. the mongoose.connect() method succeeded). At some point the MongoDB instance is restarted. How can ...
    Michael TitusMichael Titus
    Mar 8, 2012 at 1:26 am
    Mar 13, 2012 at 2:34 am
  • Hi all. Can anyone explain me why this piece of code Transaction.find({username : user.username}, ['uniqueId', 'confirmation_link', 'item_name', 'timeout', 'username'], function(err, txs){ ...
    MasiarMasiar
    Mar 4, 2012 at 2:18 pm
    Mar 13, 2012 at 2:33 am
  • I've just spent a day debugging code that assumed that a for a Schema var test = new Schema({ nr: Number }); typeof test.nr would be Number, but it is object. I now understand the reason behind it, ...
    TickTick
    Mar 30, 2012 at 1:28 pm
    Mar 30, 2012 at 6:52 pm
  • The populate function is cool for regular dbref like data, but I'm finding a need to de normalize data with the ref and would still like the convenience of populate. For example, using the example ...
    KrutKrut
    Mar 29, 2012 at 11:26 am
    Mar 30, 2012 at 6:51 pm
  • Hi, I am trying to fire a lot of simultaneous updates to Mongodb using Mongoose. Since the same model is being used via statics that I have written only one DB connection is always used. My doubts ...
    Arif AmiraniArif Amirani
    Mar 24, 2012 at 11:16 am
    Mar 25, 2012 at 8:25 pm
  • Hi All, Thanks for all the great work on mongoose, especially to Aaron. I've created two projects based on Mongoose that I would like to introduce. The first project is Mers ...
    JustinJustin
    Mar 23, 2012 at 3:51 pm
    Mar 23, 2012 at 4:53 pm
  • Sample code: var hc = new Schema({ user:[{ id:Number, name:String, update: {type:Boolean,default:false} }], upcount: Number, reason:String , chat: [{ time:{type: Date,default:Date.now}, text:String}] ...
    KyonsaltKyonsalt
    Mar 22, 2012 at 6:45 pm
    Mar 23, 2012 at 4:30 pm
  • looks like the FIND call messes up the FIELDS list...it works fine with FINDONE and FINDBYID calls. whereas the FIND call returns all the top level fields but empties the lower level objects (ones ...
    BordoixilaBordoixila
    Mar 21, 2012 at 7:53 pm
    Mar 22, 2012 at 6:11 pm
  • Let say I want the field data and I want it to be an empty {} not []. Is there a way to do this? User = new Schema data: type: {} default: {} Thanks! -- http://mongoosejs.com ...
    William TranWilliam Tran
    Mar 20, 2012 at 10:51 pm
    Mar 21, 2012 at 12:06 pm
  • Is there a more graceful way to disconnect the mongoose connection? I'm attempting to write a script that inserts documents into the database, but obviously need to call mongoose.disconnect() so that ...
    AbeAbe
    Mar 14, 2012 at 11:35 am
    Mar 14, 2012 at 8:41 pm
  • Is this possible? There's no `next` function passed to post middleware. -- http://mongoosejs.com http://github.com/learnboost/mongoose You received this message because you are subscribed to the ...
    Scott NelsonScott Nelson
    Mar 9, 2012 at 11:35 pm
    Mar 13, 2012 at 2:37 am
  • Hi everyone, How do you listen to the 'open' event when it fires after doing a mongoose.createConnection('mongodb://localhost/dbname')? I want to be able to timeout after 30 seconds or so, if the ...
    Michael YagudaevMichael Yagudaev
    Mar 5, 2012 at 2:18 pm
    Mar 13, 2012 at 2:28 am
  • my view: p Showing #{product.name} p= product.description server.js: app.get('/products/:id', function(req, res){ Product.findById(req.params.id, function(product){ res.render('products/show', ...
    EHNoleEHNole
    Mar 1, 2012 at 9:54 pm
    Mar 12, 2012 at 6:55 pm
  • I'm trying to figure out the best way to track changes to fields. For example, every time somebody changes the 'name' field on an object, I want to add a new entry to that object (embedded document) ...
    BillBill
    Mar 11, 2012 at 3:35 am
    Mar 12, 2012 at 3:38 pm
  • It seems Google Groups is acting up again the past couple days preventing us from approving new messages easily. If you've posted a message the past day or so and haven't seen it show up in the list ...
    Aaron HeckmannAaron Heckmann
    Mar 23, 2012 at 7:04 pm
    Mar 23, 2012 at 7:04 pm
  • Nice James! Thanks for sharing. I just recently set up a wiki page over here<https://github.com/LearnBoost/mongoose/wiki/Plugins so we all have a place to list what we've been working on. Feel free ...
    Aaron HeckmannAaron Heckmann
    Mar 23, 2012 at 4:45 pm
    Mar 23, 2012 at 4:45 pm
  • 2.5.13 / 2012-03-22 =================== * fixed; failing validation of unselected required paths (#730,#713) * fixed; emitting connection error when only one listener (#759) * fixed ...
    Aaron HeckmannAaron Heckmann
    Mar 22, 2012 at 2:33 pm
    Mar 22, 2012 at 2:33 pm
  • 2.5.12 / 2012-03-21 =================== * fixed; honor the `safe` option in all ensureIndex calls * updated; node-mongodb-native driver to 0.9.9-7 (installs on Win32 again) -- Aaron @aaronheckmann ...
    Aaron HeckmannAaron Heckmann
    Mar 21, 2012 at 12:35 pm
    Mar 21, 2012 at 12:35 pm
  • George that should work. I think passing options "blew up" b/c options should be the 2nd arg: mongoose.Schema.call(this, obj, options) Another more flexible way would be: mongoose.Schema.apply(this, ...
    Aaron HeckmannAaron Heckmann
    Mar 20, 2012 at 2:29 pm
    Mar 20, 2012 at 2:29 pm
  • 2.5.11 / 2012-03-15 =================== * added; introspection for getters/setters (#745) * updated; node-mongodb-driver to 0.9.9-5 * added; tailable method to Query (#769) [holic] * fixed; Number ...
    Aaron HeckmannAaron Heckmann
    Mar 15, 2012 at 5:48 pm
    Mar 15, 2012 at 5:48 pm
  • I'm curious if there's any real performance hits for using embedded documents. Like if I wanted a bare naked User model with nothing in it except a few fields, then embedded that user model into a ...
    AntelopeSaladAntelopeSalad
    Mar 14, 2012 at 4:11 pm
    Mar 14, 2012 at 4:11 pm
  • I've been Googling around for a solution and so far there doesn't seem to be a clean solution to do this properly. Validation seems to be one of the big selling points for Mongoose so IMO it makes ...
    AntelopeSaladAntelopeSalad
    Mar 13, 2012 at 2:12 pm
    Mar 13, 2012 at 2:12 pm
  • The Code type came along later so while not technically "dropped", its not supported in Mongoose core. Take a peek at https://github.com/bnoguchi/mongoose-types to see how you can extend Mongoose ...
    Aaron HeckmannAaron Heckmann
    Mar 12, 2012 at 6:00 pm
    Mar 12, 2012 at 6:00 pm
  • Yes, if you wanna clear this up in the docs that would be wonderful. Use the gh-pages branch. forcing an update isn't a bad idea. maybe open a github issue if you haven't yet. -- Aaron @aaronheckmann ...
    Aaron HeckmannAaron Heckmann
    Mar 12, 2012 at 4:22 pm
    Mar 12, 2012 at 4:22 pm
  • Hi guys, I just released a first version of an access rights plugin for mongoose. Basically it manages role based access of actors to resources, so for example if you have a document that should be ...
    Martin WawruschMartin Wawrusch
    Mar 9, 2012 at 6:21 pm
    Mar 9, 2012 at 6:21 pm
  • I also think that it would be great to define more than one message to validators. Is it planned to add this feature ? -- http://mongoosejs.com http://github.com/learnboost/mongoose You received this ...
    François ColasFrançois Colas
    Mar 8, 2012 at 11:24 pm
    Mar 8, 2012 at 11:24 pm
  • 2.5.10 / 2012-03-06 =================== * updated; node-mongodb-native driver to 0.9.9-4 * added; Query#comment() * fixed; allow unsetting arrays * fixed; hooking the set method of subdocuments ...
    Aaron HeckmannAaron Heckmann
    Mar 6, 2012 at 2:03 pm
    Mar 6, 2012 at 2:03 pm
Group Navigation
period‹ prev | Mar 2012 | next ›
Group Overview
groupmongoose-orm @
categoriesmongodb, nodejs
discussions54
posts168
users51
websitemongoosejs.com
irc#mongoosejs

51 users for March 2012

Aaron Heckmann: 51 posts Dan MacTough: 9 posts Shawn wilson: 7 posts Scott Nelson: 6 posts Daniel Baulig: 5 posts William Tran: 5 posts Eltoro: 4 posts Francois Zaninotto: 4 posts Greg Tracy: 4 posts James Carr: 4 posts Shiawuen: 4 posts Andrzej Lewandowski: 3 posts Krut: 3 posts Marvin Tam: 3 posts Mgutz: 3 posts AntelopeSalad: 2 posts Bill: 2 posts Chris: 2 posts Daniel: 2 posts Iain Mackay: 2 posts
show more