AngularJS resource saving and ORM mapping in backend

So I've got a backend using CodeIgniter, with its native ActiveRecord for managing my basic data objects. The ActiveRecord class adds a few fields to help it figure out how to associate the objects (ie. "_class_name", "_table", "_columns"). When I send these objects to the front end, these fields are included. I didn't want this so I created a sanitizing function which unset's them before they're sent to the front end.

Now when I'm in the frontend, and angular is managing all my resources, and I go and call $save() on a $resource, it sends the json object to the backend. Then in the backend I turn this json into an object with:

$blob = unserialize(sprintf(
   'O:%d:"%s"%s',
    strlen('Blob'),
    'Blob',
    strstr(strstr(serialize($blob), '"'), ':')));

This turns the json object into a Blob class, which extends ActiveRecord. Now the problem is, since I stripped out the ActiveRecord helper properties before I sent the object to the frontend... when I go to update() on the backend, it obviously can't save it properly because of the lack of these properties.

So my question is... is there something that exists which can help with this process? My basic goal is to send the minimum Blob class to the front end (sans the ActiveRecord properties), and then somehow do some backend magic upon saving to re-associate the barebones Blob class back into its ActiveRecord version so that it can save itself. I wouldn't mind researching new ORM libraries...

Thanks! Ryan

I'm not sure how you are implementing this. So here is an example on how you would implement something like this.

<div class="span2" ng-controller="NewStoryCtrl">
  <h4>New Story</h4>
  <form name="newStory">
      <label for="title">Title: </label>
      <input type="text" name ="title" ng-model="news.title" required>
      <label for="text">Text: </label>
      <textarea type="text" name="text" ng-model="news.text"required></textarea>
      <button ng-click="createNews()">Submit</button>
</form>

controller.js

function NewStoryCtrl($scope, $http) {
$scope.news = {title:$scope.title, text:$scope.text};
$scope.createNews = function(){
    $http.post('/ci/index.php/news/create/',$scope.news);
};}

news.php

public function create() {
   $data = json_decode(file_get_contents('php://input'), TRUE);
   $this->news_model->set_news($data);
}

newsModel.php

public function set_news($data) {
    $this->load->helper('url');
    $slug = url_title($data['title'], 'dash', TRUE);

    $retval = array(
        'title' => $data['title'],
        'slug' => $slug,
        'time' => time(),
        'text' => $data['text']
    );

    return $this->db->insert('news', $retval);
}