
!! 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
-
Dan Kubb (dkubb) June 1st, 2008 @ 06:24 PM
- State changed from new to invalid
Closing this, is a duplicate of #333 (which I already commented on before seeing this, which is technically the first 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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »