Skip to content

Commit

Permalink
fix(docs): clarify defaultFn
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Aaqil <[email protected]>
  • Loading branch information
aaqilniz committed Aug 19, 2024
1 parent 57bae5b commit f285ad3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/site/Model.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,18 @@ Here are general attributes for property definitions:
<li><code>"uuidv4"</code>: generate a new universally unique identifier using the UUID version 4 algorithm.</li>
<li>"<code>now"</code>: use the current date and time as returned by <code>new Date()</code></li>
</ul>
NOTE: the value of <code>defaultFn</code> is generated by LoopBack itself. If you'd like to use database built-in <code>uuid</code> functions (MySQL or Postgres for example), please check the README file of the corresponding connector.
NOTES:
<ul>
<li>
the value of <code>defaultFn</code> is generated by LoopBack itself. If you'd like to use database built-in <code>uuid</code> functions (MySQL or Postgres for example), please check the README file of the corresponding connector.
</li>
<li>
don't set <code>generated</code> to <code>true</code> incase of <code>defaultFn</code> as <code>generated</code> property indicates the value to be generated by the database not by Loopback.
</li>
<li>
don't set <code>required</code> to <code>true</code> incase of <code>defaultFn</code> as <code>required</code> means the user needs to provide the field in the request always.
</li>
</ul>
</td>
</tr>
<tr>
Expand Down

0 comments on commit f285ad3

Please sign in to comment.