-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
A use case:
var Post = model('Post')
.attr('id')
.attr('title')
.attr('slug')
.attr('content')
.attr('author');
var post = new Post({
title: "My new post",
content: "My awesome post content"
});
post.save(function(err, res) {
post.slug() // undefined
res.body.slug // "my-new-post"
post.author() // undefined
res.body.author // "Cristian Douce"
});It would be nice to have this kind of sync between model instance and server response object. Now I have to manually set an onsave callback and update model manually with the con of having my model dirty after that. Not nice :(
Metadata
Metadata
Assignees
Labels
No labels