Skip to content

Stale data in Identity Map causes data to be destroyed. #470

@rubys

Description

@rubys

All information needed to reproduce this can be found in http://intertwingly.net/stories/2011/05/09/

    depot.tgz - complete Rails 3.1 application after the point of failure
    development.log - Rails server log after the point of failure
    relation-30.html - complete scenario run successfully on Rails 3.0
    relation-31.html - same scenario with failure on Rails 3.1
    relation.rb - script used to produce the results

Note that a LineItem is created initially with an cart_id. Later that cart_id is set to nil and that record is saved to disk. After that point, a Cart.Destroy deletes that LineItem.

Key parts of the development log:

      ESC[1mESC[35mCart LoadedESC[0m  ESC[1mFrom Identity Map (id: 1)ESC[0m
      ESC[1mESC[35mSQL (0.3ms)ESC[0m  DELETE FROM "line_items" WHERE "line_items"."id" = ?  [["id", 1]]     

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions