#332 invalid
Adam French

!! Identity Map not consulted during retrieval

Reported by Adam French | May 31st, 2008 @ 12:40 PM

in all our hard work to get things going again in 0.9, we seem to have forgotten to consult the Identity Map before we re-instantiate objects.

integration/repository_spec.rb

      describe "use of the identity map" do
        
        it "should add an instance into it's identity map" do
          foo = repository(ADAPTER).first(SerialFinderSpec, {})
          foo.should_not be_nil
          repository(ADAPTER).identity_map(SerialFinderSpec).get(foo.key).should == foo
        end
        
        it "should pull out a single instance from the repo only once (identity map)" do
          pending
          foo = repository(ADAPTER).first(SerialFinderSpec, {})
          foo.should_not be_nil

          bar = repository(ADAPTER).first(SerialFinderSpec, {:id => foo.id})
          bar.should == foo
          bar.object_id.should == foo.object_id
        end
        
      end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages