not accessing old data on mongodb atlas by Node application
I have not used mongodb atlas for 10 days.
when I am trying to connect node application after 10 days into mongodb atlas returning blank array in find Query from Node application , when I inserted new data into mongodb atlas using Node application then find Query return only new data .
Problem is that mongodb atlus not returning old data.
but App collection have
db.apps.count({}) > 29
Code
let mongoose = require("mongoose");
let uri = mongodb atlus path || "mongodb://localhost:27017/test";
mongoose.connect(uri, function (err, client) {
console.log('mongoose connect SuccessFully');});
let appSchema = new mongoose.Schema({name:{type: String}});
let taxSchema = new mongoose.Schema({tax:{type: String}});
var App = mongoose.model('App', appSchema);
var Tax = mongoose.model('Tax', taxSchema);
App.find({}).then(function (apps) {
console.log(apps); // returning "
});
Tax.find({}).then(function (tax) {
console.log(tax); // returning
});
facing problem with old data of mongodb atlas not giving.
Every Query returns null or array depend upon what Query you have . I am stuck from past one day with mongodb atlas.
this code work fine with local mongodb .
javascript node.js mongodb mongoose
add a comment |
I have not used mongodb atlas for 10 days.
when I am trying to connect node application after 10 days into mongodb atlas returning blank array in find Query from Node application , when I inserted new data into mongodb atlas using Node application then find Query return only new data .
Problem is that mongodb atlus not returning old data.
but App collection have
db.apps.count({}) > 29
Code
let mongoose = require("mongoose");
let uri = mongodb atlus path || "mongodb://localhost:27017/test";
mongoose.connect(uri, function (err, client) {
console.log('mongoose connect SuccessFully');});
let appSchema = new mongoose.Schema({name:{type: String}});
let taxSchema = new mongoose.Schema({tax:{type: String}});
var App = mongoose.model('App', appSchema);
var Tax = mongoose.model('Tax', taxSchema);
App.find({}).then(function (apps) {
console.log(apps); // returning "
});
Tax.find({}).then(function (tax) {
console.log(tax); // returning
});
facing problem with old data of mongodb atlas not giving.
Every Query returns null or array depend upon what Query you have . I am stuck from past one day with mongodb atlas.
this code work fine with local mongodb .
javascript node.js mongodb mongoose
I'm voting to close this question as off-topic because This does not sound like a question for here. I think you need to contact Atlas support for this if what you are saying is your previously existing data is missing. The StackOverflow community can help you with coding problems, but has not influence over provider support or storage.
– Neil Lunn
Nov 23 '18 at 10:24
Your old data might be in a different database. By default, you are connecting to thetest
database. Open the "Cluster" section of Atlas console, Click on "collections". You will see different databases on the cluster and the collections and data inside them. See if you can find your old data in one of those.
– Dushyant Bangal
Nov 23 '18 at 10:49
thanks @DushyantBangal . working Fine
– Rahul Modanwal
Nov 24 '18 at 6:47
@RahulModanwal, good to know. I've posted it as an answer for other users.
– Dushyant Bangal
Nov 26 '18 at 13:18
my be old data is stored with different schema...
– Matee Gojra
Nov 26 '18 at 13:32
add a comment |
I have not used mongodb atlas for 10 days.
when I am trying to connect node application after 10 days into mongodb atlas returning blank array in find Query from Node application , when I inserted new data into mongodb atlas using Node application then find Query return only new data .
Problem is that mongodb atlus not returning old data.
but App collection have
db.apps.count({}) > 29
Code
let mongoose = require("mongoose");
let uri = mongodb atlus path || "mongodb://localhost:27017/test";
mongoose.connect(uri, function (err, client) {
console.log('mongoose connect SuccessFully');});
let appSchema = new mongoose.Schema({name:{type: String}});
let taxSchema = new mongoose.Schema({tax:{type: String}});
var App = mongoose.model('App', appSchema);
var Tax = mongoose.model('Tax', taxSchema);
App.find({}).then(function (apps) {
console.log(apps); // returning "
});
Tax.find({}).then(function (tax) {
console.log(tax); // returning
});
facing problem with old data of mongodb atlas not giving.
Every Query returns null or array depend upon what Query you have . I am stuck from past one day with mongodb atlas.
this code work fine with local mongodb .
javascript node.js mongodb mongoose
I have not used mongodb atlas for 10 days.
when I am trying to connect node application after 10 days into mongodb atlas returning blank array in find Query from Node application , when I inserted new data into mongodb atlas using Node application then find Query return only new data .
Problem is that mongodb atlus not returning old data.
but App collection have
db.apps.count({}) > 29
Code
let mongoose = require("mongoose");
let uri = mongodb atlus path || "mongodb://localhost:27017/test";
mongoose.connect(uri, function (err, client) {
console.log('mongoose connect SuccessFully');});
let appSchema = new mongoose.Schema({name:{type: String}});
let taxSchema = new mongoose.Schema({tax:{type: String}});
var App = mongoose.model('App', appSchema);
var Tax = mongoose.model('Tax', taxSchema);
App.find({}).then(function (apps) {
console.log(apps); // returning "
});
Tax.find({}).then(function (tax) {
console.log(tax); // returning
});
facing problem with old data of mongodb atlas not giving.
Every Query returns null or array depend upon what Query you have . I am stuck from past one day with mongodb atlas.
this code work fine with local mongodb .
javascript node.js mongodb mongoose
javascript node.js mongodb mongoose
edited Nov 23 '18 at 10:22
Neil Lunn
101k23178187
101k23178187
asked Nov 23 '18 at 10:18
Rahul ModanwalRahul Modanwal
184
184
I'm voting to close this question as off-topic because This does not sound like a question for here. I think you need to contact Atlas support for this if what you are saying is your previously existing data is missing. The StackOverflow community can help you with coding problems, but has not influence over provider support or storage.
– Neil Lunn
Nov 23 '18 at 10:24
Your old data might be in a different database. By default, you are connecting to thetest
database. Open the "Cluster" section of Atlas console, Click on "collections". You will see different databases on the cluster and the collections and data inside them. See if you can find your old data in one of those.
– Dushyant Bangal
Nov 23 '18 at 10:49
thanks @DushyantBangal . working Fine
– Rahul Modanwal
Nov 24 '18 at 6:47
@RahulModanwal, good to know. I've posted it as an answer for other users.
– Dushyant Bangal
Nov 26 '18 at 13:18
my be old data is stored with different schema...
– Matee Gojra
Nov 26 '18 at 13:32
add a comment |
I'm voting to close this question as off-topic because This does not sound like a question for here. I think you need to contact Atlas support for this if what you are saying is your previously existing data is missing. The StackOverflow community can help you with coding problems, but has not influence over provider support or storage.
– Neil Lunn
Nov 23 '18 at 10:24
Your old data might be in a different database. By default, you are connecting to thetest
database. Open the "Cluster" section of Atlas console, Click on "collections". You will see different databases on the cluster and the collections and data inside them. See if you can find your old data in one of those.
– Dushyant Bangal
Nov 23 '18 at 10:49
thanks @DushyantBangal . working Fine
– Rahul Modanwal
Nov 24 '18 at 6:47
@RahulModanwal, good to know. I've posted it as an answer for other users.
– Dushyant Bangal
Nov 26 '18 at 13:18
my be old data is stored with different schema...
– Matee Gojra
Nov 26 '18 at 13:32
I'm voting to close this question as off-topic because This does not sound like a question for here. I think you need to contact Atlas support for this if what you are saying is your previously existing data is missing. The StackOverflow community can help you with coding problems, but has not influence over provider support or storage.
– Neil Lunn
Nov 23 '18 at 10:24
I'm voting to close this question as off-topic because This does not sound like a question for here. I think you need to contact Atlas support for this if what you are saying is your previously existing data is missing. The StackOverflow community can help you with coding problems, but has not influence over provider support or storage.
– Neil Lunn
Nov 23 '18 at 10:24
Your old data might be in a different database. By default, you are connecting to the
test
database. Open the "Cluster" section of Atlas console, Click on "collections". You will see different databases on the cluster and the collections and data inside them. See if you can find your old data in one of those.– Dushyant Bangal
Nov 23 '18 at 10:49
Your old data might be in a different database. By default, you are connecting to the
test
database. Open the "Cluster" section of Atlas console, Click on "collections". You will see different databases on the cluster and the collections and data inside them. See if you can find your old data in one of those.– Dushyant Bangal
Nov 23 '18 at 10:49
thanks @DushyantBangal . working Fine
– Rahul Modanwal
Nov 24 '18 at 6:47
thanks @DushyantBangal . working Fine
– Rahul Modanwal
Nov 24 '18 at 6:47
@RahulModanwal, good to know. I've posted it as an answer for other users.
– Dushyant Bangal
Nov 26 '18 at 13:18
@RahulModanwal, good to know. I've posted it as an answer for other users.
– Dushyant Bangal
Nov 26 '18 at 13:18
my be old data is stored with different schema...
– Matee Gojra
Nov 26 '18 at 13:32
my be old data is stored with different schema...
– Matee Gojra
Nov 26 '18 at 13:32
add a comment |
1 Answer
1
active
oldest
votes
Your old data might be in a different database.
By default, you are connecting to the test database.
To see the different databases and collections, the easiest way is:
- Open the "Cluster" section of Atlas console
- Click on "collections".
You will see different databases on the cluster and the collections
and data inside them. - See if you can find your old data in one of
those
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53444769%2fnot-accessing-old-data-on-mongodb-atlas-by-node-application%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your old data might be in a different database.
By default, you are connecting to the test database.
To see the different databases and collections, the easiest way is:
- Open the "Cluster" section of Atlas console
- Click on "collections".
You will see different databases on the cluster and the collections
and data inside them. - See if you can find your old data in one of
those
add a comment |
Your old data might be in a different database.
By default, you are connecting to the test database.
To see the different databases and collections, the easiest way is:
- Open the "Cluster" section of Atlas console
- Click on "collections".
You will see different databases on the cluster and the collections
and data inside them. - See if you can find your old data in one of
those
add a comment |
Your old data might be in a different database.
By default, you are connecting to the test database.
To see the different databases and collections, the easiest way is:
- Open the "Cluster" section of Atlas console
- Click on "collections".
You will see different databases on the cluster and the collections
and data inside them. - See if you can find your old data in one of
those
Your old data might be in a different database.
By default, you are connecting to the test database.
To see the different databases and collections, the easiest way is:
- Open the "Cluster" section of Atlas console
- Click on "collections".
You will see different databases on the cluster and the collections
and data inside them. - See if you can find your old data in one of
those
answered Nov 26 '18 at 13:17
Dushyant BangalDushyant Bangal
2,88021652
2,88021652
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53444769%2fnot-accessing-old-data-on-mongodb-atlas-by-node-application%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I'm voting to close this question as off-topic because This does not sound like a question for here. I think you need to contact Atlas support for this if what you are saying is your previously existing data is missing. The StackOverflow community can help you with coding problems, but has not influence over provider support or storage.
– Neil Lunn
Nov 23 '18 at 10:24
Your old data might be in a different database. By default, you are connecting to the
test
database. Open the "Cluster" section of Atlas console, Click on "collections". You will see different databases on the cluster and the collections and data inside them. See if you can find your old data in one of those.– Dushyant Bangal
Nov 23 '18 at 10:49
thanks @DushyantBangal . working Fine
– Rahul Modanwal
Nov 24 '18 at 6:47
@RahulModanwal, good to know. I've posted it as an answer for other users.
– Dushyant Bangal
Nov 26 '18 at 13:18
my be old data is stored with different schema...
– Matee Gojra
Nov 26 '18 at 13:32