# File lib/active_ldap/acts/tree.rb, line 57
      def parent=(entry)
        if entry.is_a?(String)
          base = entry
        elsif entry.respond_to?(:dn)
          base = entry.dn
          if entry.respond_to?(:clear_association_cache)
            entry.clear_association_cache
          end
        else
          message = _("parent must be an entry or parent DN: %s") % entry.inspect
          raise ArgumentError, message
        end
        destroy unless new_entry?
        self.dn = "#{dn_attribute}=#{id},#{base}"
        save
      end