Creation
new Model(
/* {object} -- The entity data to be saved */
<data>,
/* {int|string}. -- optional. The id of the entity.
If not passed the Datastore will automatically
generate a random one
*/
<id>,
/* {Array} -- optional. Ancestors of the entity. ex: ['ParentEntity', 1234 ] */
<ancestors>,
/* {string} -- optional. A specific namespace */
<namespace>
)
example:
const blogPost = new BlogPost({title: 'title of the post', author: 'John Snow' });id
ancestors
namespace
Last updated
Was this helpful?