Skip to content

Commit

Permalink
Do not include store properties on Entity serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultz committed Sep 7, 2011
1 parent c438ac3 commit 88b5315
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/mesh/model/Entity.as
Expand Up @@ -452,6 +452,7 @@ package mesh.model
}

private var _storeKey:Object;
[Transient]
/**
* The global unique identifier assigned to this entity by the store.
*/
Expand Down
9 changes: 8 additions & 1 deletion src/mesh/model/store/Commits.as
Expand Up @@ -110,7 +110,14 @@ package mesh.model.store
var snapshot:ByteArray = new ByteArray();
snapshot.writeObject(entities);
snapshot.position = 0;
return snapshot.readObject();

var copied:Array = snapshot.readObject();
var len:int = entities.length;
for (var i:int = 0; i < len; i++) {
copied[i].storeKey = entities[i].storeKey;
}

return copied;
}

private var _checkpoint:Commit;
Expand Down

0 comments on commit 88b5315

Please sign in to comment.