Skip to content

Commit

Permalink
docs(model): add comments for $__updateConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Apr 7, 2024
1 parent c68fcfd commit 9fb1d81
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -4893,8 +4893,14 @@ Model.compile = function compile(name, schema, collectionName, connection, base)
return model;
};

/*!
* ignore
/**
* Update this model to use the new connection, including updating all internal
* references and creating a new `COllection` instance using the new connection.
* Not for external use, only used by `setDriver()` to ensure that you can still
* call `setDriver()` after creating a model using `mongoose.model()`.
*
* @param {Connection} newConnection the new connection to use
* @api private
*/

Model.$__updateConnection = function $__updateConnection(newConnection) {
Expand Down

0 comments on commit 9fb1d81

Please sign in to comment.