File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,27 @@ Connection.prototype.collections;
187
187
188
188
Connection . prototype . name ;
189
189
190
+ /**
191
+ * A [POJO](https://masteringjs.io/tutorials/fundamentals/pojo) containing
192
+ * a map from model names to models. Contains all models that have been
193
+ * added to this connection using [`Connection#model()`](/docs/api/connection.html#connection_Connection-model).
194
+ *
195
+ * ####Example
196
+ *
197
+ * const conn = mongoose.createConnection();
198
+ * const Test = conn.model('Test', mongoose.Schema({ name: String }));
199
+ *
200
+ * Object.keys(conn.models).length; // 1
201
+ * conn.models.Test === Test; // true
202
+ *
203
+ * @property models
204
+ * @memberOf Connection
205
+ * @instance
206
+ * @api public
207
+ */
208
+
209
+ Connection . prototype . models ;
210
+
190
211
/**
191
212
* The plugins that will be applied to all models created on this connection.
192
213
*
You can’t perform that action at this time.
0 commit comments