Skip to content

Instantly share code, notes, and snippets.

@dbussink
Created March 29, 2009 17:52
Show Gist options
  • Select an option

  • Save dbussink/87474 to your computer and use it in GitHub Desktop.

Select an option

Save dbussink/87474 to your computer and use it in GitHub Desktop.
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