Created
March 29, 2009 17:52
-
-
Save dbussink/87474 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/dm-core/associations/relationship.rb b/lib/dm-core/associations/relationship.rb | |
| index 081d646..2ca1822 100644 | |
| --- a/lib/dm-core/associations/relationship.rb | |
| +++ b/lib/dm-core/associations/relationship.rb | |
| @@ -81,10 +81,8 @@ module DataMapper | |
| with_repository(child_model) do |r| | |
| parent_identity_map = parent.repository.identity_map(parent_model) | |
| - child_identity_map = r.identity_map(child_model) | |
| query_values = parent_identity_map.keys | |
| - query_values.reject! { |k| child_identity_map[k] } | |
| bind_values = query_values unless query_values.empty? | |
| query = child_key.zip(bind_values.transpose).to_hash | |
| diff --git a/spec/integration/auto_migrations_spec.rb b/spec/integration/auto_migrations_spec.rb | |
| index a53234d..1308379 100755 | |
| --- a/spec/integration/auto_migrations_spec.rb | |
| +++ b/spec/integration/auto_migrations_spec.rb | |
| @@ -131,7 +131,7 @@ if HAS_SQLITE3 | |
| expected_value = types[name][4] | |
| it 'should properly typecast value' do | |
| - if DateTime == klass | |
| + if DateTime == klass || Time == klass | |
| @book.send(name).to_s.should == expected_value.to_s | |
| else | |
| @book.send(name).should == expected_value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment