GET
MyModel.get(
/*
{{string | { id: string|number } | { name: string } | { key: EntityKey }}}
*/
<id>,
/* {object} -- optional. Additional configuration */
<options>
)const BlogPost = require('./blog-post.model');
// id can be an integer or a string
BlogPost.get({ id: 123 }).then((entity) => {
console.log(entity.plain());
});
// Passing an ancestor path with a Kind and a name
const ancestors = ['Parent', 'parentName'];
BlogPost.get('myEntityId', { ancestors }).then((entity) => { ... });options properties
Last updated
Was this helpful?