<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -362,7 +362,7 @@ module DataMapper
 
     # TODO: spec this
     def to_query(repository, key, query = {})
-      conditions = Hash[ *self.key(repository_name).zip(key).flatten ]
+      conditions = Hash[ *self.key(repository.name).zip(key).flatten ]
       Query.new(repository, self, query.merge(conditions))
     end
 </diff>
      <filename>lib/dm-core/model.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e1c15f8f3020c488d0d154cdbfa14464c0cd1ea9</id>
    </parent>
  </parents>
  <author>
    <name>Dan Kubb</name>
    <email>dan.kubb@autopilotmarketing.com</email>
  </author>
  <url>http://github.com/sam/dm-core/commit/407010497e284ef993e75606cca079ffae84f759</url>
  <id>407010497e284ef993e75606cca079ffae84f759</id>
  <committed-date>2008-11-17T21:08:26-08:00</committed-date>
  <authored-date>2008-11-17T21:08:26-08:00</authored-date>
  <message>Updated Model#to_query to use the passed-in repository</message>
  <tree>c51042cc63ee5293b2c7e0a2902f9bd192cb88df</tree>
  <committer>
    <name>Dan Kubb</name>
    <email>dan.kubb@autopilotmarketing.com</email>
  </committer>
</commit>
