[]= (DataMapper::Collection)

    # File lib/dm-core/collection.rb, line 395
        def []=(*args)
          orphans = Array(superclass_slice(*args[0..-2]))

          # relate new resources
          resources = resources_added(super)

          # mark resources as removed
          resources_removed(orphans - loaded_entries)

          # ensure remaining orphans are still related
          (orphans & loaded_entries).each { |resource| relate_resource(resource) }

          resources
        end