@@ -258,16 +258,21 @@ schema builder method in your application.
258258You can also use the following methods to return more information about the
259259collection fields:
260260
261- - ``Schema::hasColumn(string $<collection>, string $<field name>)``: checks if the specified field exists
262- in at least one document
263- - ``Schema::hasColumns(string $<collection>, string[] $<field names>)``: checks if each specified field exists
264- in at least one document
261+ - ``Schema::hasColumn(string $<collection>, string $<field name>)``:
262+ checks if the specified field exists in at least one document
263+ - ``Schema::hasColumns(string $<collection>, string[] $<field names>)``:
264+ checks if each specified field exists in at least one document
265265
266- .. note::
266+ MongoDB is a schemaless database, so the preceding methods query the collection
267+ data rather than the database schema. If the specified collection doesn't exist
268+ or is empty, these methods return a value of ``false``.
269+
270+ .. note:: id Alias
267271
268- MongoDB is a schemaless database, so the preceding methods query the collection
269- data rather than the database schema. If the specified collection doesn't exist
270- or is empty, these methods return a value of ``false``.
272+ Starting in {+odm-long+} v5.1, the ``getColumns()`` method returns
273+ the ``_id`` field name as the alias ``id``. You can pass either
274+ ``_id`` or ``id`` to the ``hasColumn()`` and ``hasColumns()``
275+ methods.
271276
272277Example
273278```````
0 commit comments