- Reference >
- Enumeration Classes >
- MongoDB\Model\CollectionInfo::getIdIndex()
MongoDB\Model\CollectionInfo::getIdIndex()
New in version 1.9.
On this page
Definition
-
MongoDB\Model\CollectionInfo::getIdIndex
Returns information about the
_id
field index.
Return Values
An array containing information on the _id
index. This corresponds to the
idIndex
field returned in the listCollections
command reply.
Examples
The output would then resemble:
See Also
MongoDB\Database::createCollection()
- listCollections command reference in the MongoDB manual