<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.pchero21.com/index.php?action=history&amp;feed=atom&amp;title=MongoDB</id>
	<title>MongoDB - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.pchero21.com/index.php?action=history&amp;feed=atom&amp;title=MongoDB"/>
	<link rel="alternate" type="text/html" href="http://wiki.pchero21.com/index.php?title=MongoDB&amp;action=history"/>
	<updated>2026-04-18T22:13:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>http://wiki.pchero21.com/index.php?title=MongoDB&amp;diff=2848&amp;oldid=prev</id>
		<title>Pchero: Created page with &quot;== Overview == MongoDB 내용 정리.  == Errors == === db.collection is not a function === In mongodb version &gt;= 3.0, that database variable is actually the parent object of...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.pchero21.com/index.php?title=MongoDB&amp;diff=2848&amp;oldid=prev"/>
		<updated>2018-01-06T14:57:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Overview == MongoDB 내용 정리.  == Errors == === db.collection is not a function === In mongodb version &amp;gt;= 3.0, that database variable is actually the parent object of...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
MongoDB 내용 정리.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
=== db.collection is not a function ===&lt;br /&gt;
In mongodb version &amp;gt;= 3.0, that database variable is actually the parent object of the object it trying to access with database.collection('whatever'). &lt;br /&gt;
&lt;br /&gt;
To access the correct object, it need to reference its database name.&lt;br /&gt;
&amp;lt;source lang=javascript&amp;gt;&lt;br /&gt;
MongoClient.connect(db.url,(err,database) =&amp;gt;{ &lt;br /&gt;
  const myAwesomeDB = database.db('myDatabaseNameAsAString')&lt;br /&gt;
  myAwesomeDB.collection('theCollectionIwantToAccess')&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* https://stackoverflow.com/questions/43779323/typeerror-db-collection-is-not-a-function&lt;br /&gt;
&lt;br /&gt;
[[category:system]]&lt;/div&gt;</summary>
		<author><name>Pchero</name></author>
	</entry>
</feed>