Data dodania Pytanie
2018-02-04 15:02 Mongoose get collection, where ref »
I have two schemas: Pages and Posts. var pageSchema = new Schema({ commented_times: { type: Number, default: 0 }, posts: ...
(0) odpowiedzi
2018-01-28 12:01 Mongodb schema emptied after seconds »
When i am making a request to save a new object to my mongodb, it gets saved, and after seconds everything in that schema disappears. In the screensho...
(1) odpowiedzi
2018-01-26 08:01 Node Express Mongoose array isn't populated with referenced model »
I've been trying to add a related model in an array of model. But when I test the api, the array is always empty. And I've been looking around for ans...
(2) odpowiedzi
2018-01-15 21:01 How to update and upsert documents in MongoDB (Mongoose). NodeJS »
I have a service which get data from server using GET request. I repeat this request every 10 seconds and after every request I save these data to my ...
(1) odpowiedzi
2018-01-14 17:01 Not understanding the Mongoose Model? »
I am currently in the process of learning the MEAN stack, and in my studies I am currently on Mongoose. I have an issue understanding what is the mod...
(2) odpowiedzi
2018-01-13 05:01 node js mongose how to fetch reocord from two collection »
In that below collections I want to try fetch all record from coin_infos collection matching _id of coin_infos with coin_id of wallet_infos and user_i...
(1) odpowiedzi
2018-01-10 23:01 Can't use "delete" operator on mongoose query results »
I'm trying to delete a key before sending data back to the browser. For some reason, maybe because it is a mongoose object, this isn't working: delet...
(5) odpowiedzi
2018-01-06 21:01 How do i prevent mongoose.populate() adding a null property? »
is a document of mongo, I'm using mongoose "^4.11.4",express "^4.15.3" and "ejs": "^2.5.6" schemas: const serieSchema = new Schema({ title: { ...
(0) odpowiedzi
2018-01-02 09:01 Jest, mongoose and async/await »
i have a mongoose model in the node. I want to get all record from that in my test suite with the jest. here is my test: test('should find and return...
(1) odpowiedzi
2017-12-31 18:12 Structuring a Nodejs, express & ejs app »
Wondering what is the best way to structure the ejs part of the application, here is my current structure. inside maindir/ index.js // starts the a...
(2) odpowiedzi
2017-12-25 22:12 Node.js - Abstracting mongoose model from domain model »
I am building a rest API in node. I am following a general ddd architecture ie repositories, domain models, entities, value objects etc. I chose monto...
(1) odpowiedzi
2017-12-24 23:12 Insert Into Array of object MongoDB »
I have { "_id" : ObjectId("5a25af80d2c4dd065991dccc"), "username" : "abc@gmail.com", "password" : "$2a$10$ptFyLKtyyrL5gMYdXS6wV.HLUA4Py5...
(3) odpowiedzi
2017-12-23 20:12 Save doesn't save any data »
I'm trying to save some data into a local mongodb database. My schema looks as follows: const mongoose = require('mongoose'); const userSchema...
(3) odpowiedzi
2017-12-23 07:12 how can i get the fetched record in route model node js »
I am getting the fetch records on console, but I want to access on route page. module.exports.getcoin_info = function(err,callback){ var results = ...
(1) odpowiedzi
2017-12-17 13:12 What is the proper way to check if id exists or not ? (ejs, mongoose) »
If i have code like: index.js app.get('/link/:id', (req, res) => { collection.find({ _id: req.params.id }, (err, collection) => { if(err) re...
(0) odpowiedzi
2017-11-25 13:11 Confusion about this in callbacks »
I am really confused about the value of this in callbacks, well I know that the value of this is always taken from where it was called, but here in th...
(3) odpowiedzi
2017-11-17 16:11 Asynchronicity of a Mongoose Promise »
First, pardon my slightly ambiguous title; I could not find a more appropriate one: Scenario I am using Mongoose to fetch some data and then render ...
(2) odpowiedzi
2017-11-07 10:11 Get next document in Mongodb using an assigned Model variable »
I'm using Node.js with express that has a mongodb database and mongoose installed. I have the following Model: var lectureSchema = new mongoose.Sche...
(0) odpowiedzi
2017-11-03 13:11 Check resource ownership on Node.js rest API »
I'm trying to develop a Node.js backend using express and mongoose. Over the network there's plenty of examples of how to implement a proper authenti...
(2) odpowiedzi
2017-10-28 18:10 how to get specific data to html home page from mongodb database »
how to get specific data to Html homepage from MongoDB database? I have all MongoDB user datas in my HTML home page.but how to get specific user id
(0) odpowiedzi
2017-10-22 20:10 Mongoose sort using a model variable and a forEach loop »
I have the following model: var lectureSchema = new mongoose.Schema({ name: String, image: String, url: String, description: String, ...
(1) odpowiedzi
2017-10-12 07:10 why my Delete function deleting only First elemet in express with jquery »
when I press delete button of the particular element my delete function deleting only first elemet, y? list.pug (my view file) ul each sport...
(1) odpowiedzi
2017-10-10 18:10 Express : update DB from client »
I'm trying to pass arguments between server -> client -> server. If an user asks to create an article, the server creates a new one in the DB and send...
(0) odpowiedzi
2017-10-07 15:10 Awkward escape characters »
Whilst trying to console.log a string I've run into a rather annoying issue. I store the string 2^{\\frac{1}{2}}x=1 in a Node.js database yet when out...
(1) odpowiedzi
2017-10-06 01:10 Organzing data with Javascript into a table »
I have about 5k in documents that I need to sort through and organize, pulling from mongodb, through express, and out to a ejs template. I have been a...
(2) odpowiedzi
2017-10-05 10:10 Mongoose switching multiple connections »
I am using Node.Js 8.6 along with Mongoose 4.11 and have multiple database connections. Db connections are established via mongoose.createConnection. ...
(1) odpowiedzi
2017-10-04 14:10 Displaying data from a Mongodb collection in ejs using Mongoose »
I am brand new to programming. I have a collection called "Practice" in my local database which has "name, role, org". I am trying to figure out how t...
(1) odpowiedzi
2017-10-03 13:10 Deleting a record using Mongoose with Redux »
I want to delete a record in my mongoDB, when a user presses a button for the given record. For reference: I have all my mongoose and redux code s...
(2) odpowiedzi
2017-10-02 18:10 Mongoose Get full list of users in table »
I got all users details to use if and for loop from MongoDB database. but I want to all details in a HTML table so how to do that? I got all details ...
(1) odpowiedzi
2017-09-28 20:09 mongoose - render distinct values and slugify those values »
I have a collection of 200k documents, each containing a "CustomerName" field. There are about 1k unique "customerName" values. (the field is indexed)...
(1) odpowiedzi
2017-09-24 09:09 Mongodb findOneAndUpdate function is inserting new document »
I just need to update serviceActiveFlag status whenever i make an update api call.After an update api call,i can see a new document with empty vehicl...
(0) odpowiedzi
2017-09-23 01:09 Is there any way to save HTML element class changes made by Jquery in a generated EJS file? »
I have a to-do list node project, where each to-do list is saved as an entity in MongoDB, like so: var todoSchema = new mongoose.Schema({ items: [S...
(1) odpowiedzi
2017-08-30 09:08 Mongoose schema creates empty array field »
In my Food schema, I have different fields based on the other field called yummy. For example: if yummy equals pancake, my fields are dough and jam ...
(1) odpowiedzi
2017-08-27 20:08 MEAN 2 Multi Tenancy (Multiple collection saves that reference each other) »
So whilst learning JS and specifically the MEAN 2 stack i'm trying to build out a basic multi tenanted app. Im building out sign up routes in express ...
(1) odpowiedzi
2017-08-17 01:08 How to make pagination with Node, Mongoose, Bootstrap and pass it to html? »
I'm building a blog with NodeJS, I'm using "Mongoose Paginate" to divide the database in pages, Bootstrap 4, EJS as view engine and the JQuery Paginat...
(1) odpowiedzi