-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
I am creating a CRUD interface using ModelCore, the save method failed on Create because the $new method does not create the required mapping for the $toObject method. I fixed the problem in my app by copying the mapping from the parent object:
$scope.posts = new Posts();
$scope.newPost = $scope.posts.$new();
$scope.posts.$find().success(function() {
$scope.newPost.$mapping = $scope.posts.$dataset[0].$mapping;
});
I'm not sure if there is a better way of doing this?