diff --git a/lib/dm-core/model.rb b/lib/dm-core/model.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-core/model.rb
+++ b/lib/dm-core/model.rb
@@ -388,8 +388,9 @@ module DataMapper
     # TODO: add docs
     # @api private
     def _load(marshalled)
-      repository_name, attributes = Marshal.load(marshalled)
-      repository(repository_name) { new(attributes) }
+      resource = allocate
+      Marshal.load(marshalled).each { |kv| resource.instance_variable_set(*kv) }
+      resource
     end
 
     def typecast_key(key)
diff --git a/lib/dm-core/resource.rb b/lib/dm-core/resource.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-core/resource.rb
+++ b/lib/dm-core/resource.rb
@@ -531,14 +531,13 @@ module DataMapper
     # TODO: add docs
     # @api private
     def _dump(*)
-      repository_name = repository.name
-      attributes      = {}
+      ivars = {}
 
-      model.properties(repository_name).slice(*loaded_attributes).compact.each do |property|
-        attributes[property.name] = property.get(self) if property.writer_visibility == :public
+      (instance_variables - %w[ @child_associations @parent_associations @collection ]).each do |name|
+        ivars[name] = instance_variable_get(name)
       end
 
-      Marshal.dump([ repository_name, attributes ])
+      Marshal.dump(ivars)
     end
 
     protected
Updated Resource marshaling to be more thorough

* Now dumps every ivar, aside from anything collection/association
  related.  This should work better for tracking ivars like @new_record
  or others added to the object by the end user.