create()
Create a document in the collection.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
data |
Yes |
Object describing the document properties and values. |
Examples
Product.create({ name: "key limes" })
{
id: "357102606290518049",
coll: Product,
ts: Time("2099-02-19T14:53:53.940Z"),
name: "key limes"
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!