Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-9797

[Ottoman] - Add section on how to generate a UUID for a field

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • DOC-2022-S5, DOC-2022-S6, DOC-2022-S7, DOC-2022-S8, DOC-2022-S9, DOC-2022-S10, DOC-2022-S11, DOC-2022-S12, DOC-2022-S13
    • 1

    Description

      https://github.com/couchbaselabs/node-ottoman/issues/640

      Questions around "how to generate UUID for a field " pop up quite often.
      It's difficult to infer this information from the current documentation.

      We should add a section in the documentation which is searchable and at the same time has example around it.

      As an example for a field _id to use UUID it's as simple as attributing it as auto : 'uuid'

       _id: { type: String, required: true, auto: ‘uuid’ }

      Maybe we could add this in the Ottoman Getting Started page? This is for the ottoman documentation, not our docs site.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          There are no comments yet on this issue.

          People

            maria.shodunke Maria Shodunke
            maria.shodunke Maria Shodunke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty