Bugfix: You need to have the entity before you can see if it's deleted
authorAndy Allan <gravitystorm@gmail.com>
Sat, 29 May 2010 19:30:09 +0000 (19:30 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Sat, 29 May 2010 19:30:09 +0000 (19:30 +0000)
net/systemeD/halcyon/connection/XMLConnection.as

index dea20b7..224d3e9 100644 (file)
@@ -298,10 +298,10 @@ package net.systemeD.halcyon.connection {
         private function addCreated(changeset:Changeset, getIDs:Function, get:Function, serialise:Function):XML {
             var create:XML = <create version="0.6"/>
             for each( var id:Number in getIDs() ) {
+                var entity:Entity = get(id);
                 if ( id >= 0 || entity.deleted )
                     continue;
                     
-                var entity:Object = get(id);
                 var xml:XML = serialise(entity);
                 xml.@changeset = changeset.id;
                 create.appendChild(xml);