<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -9,10 +9,6 @@ module DataMapper
         raise ArgumentError, &quot;+name+ should be a Symbol, but was #{name.class}&quot;, caller     unless Symbol === name
         raise ArgumentError, &quot;+options+ should be a Hash, but was #{options.class}&quot;, caller unless Hash   === options
 
-        if (unknown_options = options.keys - OPTIONS).any?
-          raise ArgumentError, &quot;+options+ contained unknown keys: #{unknown_options * ', '}&quot;
-        end
-
         child_model_name  = DataMapper::Inflection.demodulize(self.name)
         parent_model_name = options.fetch(:class_name, DataMapper::Inflection.classify(name))
 </diff>
      <filename>lib/data_mapper/associations/many_to_many.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,6 @@ module DataMapper
         raise ArgumentError, &quot;+name+ should be a Symbol, but was #{name.class}&quot;, caller     unless Symbol === name
         raise ArgumentError, &quot;+options+ should be a Hash, but was #{options.class}&quot;, caller unless Hash   === options
 
-        if (unknown_options = options.keys - OPTIONS).any?
-          raise ArgumentError, &quot;+options+ contained unknown keys: #{unknown_options * ', '}&quot;
-        end
-
         child_model_name  = DataMapper::Inflection.demodulize(self.name)
         parent_model_name = options[:class_name] || DataMapper::Inflection.classify(name)
 </diff>
      <filename>lib/data_mapper/associations/many_to_one.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require 'forwardable'
 module DataMapper
   module Associations
     module OneToMany
-      OPTIONS = [ :class_name, :child_key, :parent_key, :min, :max, :order ]
+      OPTIONS = [ :class_name, :child_key, :parent_key, :min, :max ]
 
       private
 
@@ -11,10 +11,6 @@ module DataMapper
         raise ArgumentError, &quot;+name+ should be a Symbol (or Hash for +through+ support), but was #{name.class}&quot;, caller     unless Symbol === name || Hash === name
         raise ArgumentError, &quot;+options+ should be a Hash, but was #{options.class}&quot;, caller unless Hash   === options
 
-        if (unknown_options = options.keys - OPTIONS).any?
-          raise ArgumentError, &quot;+options+ contained unknown keys: #{unknown_options * ', '}&quot;
-        end
-
         child_model_name = options.fetch(:class_name, DataMapper::Inflection.classify(name))
 
         relationship = relationships(repository.name)[name] = Relationship.new(</diff>
      <filename>lib/data_mapper/associations/one_to_many.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,6 @@ module DataMapper
         raise ArgumentError, &quot;+name+ should be a Symbol, but was #{name.class}&quot;, caller     unless Symbol === name
         raise ArgumentError, &quot;+options+ should be a Hash, but was #{options.class}&quot;, caller unless Hash   === options
 
-        if (unknown_options = options.keys - OPTIONS).any?
-          raise ArgumentError, &quot;+options+ contained unknown keys: #{unknown_options * ', '}&quot;
-        end
-
         child_model_name  = options.fetch(:class_name, DataMapper::Inflection.classify(name))
         parent_model_name = DataMapper::Inflection.demodulize(self.name)
 </diff>
      <filename>lib/data_mapper/associations/one_to_one.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,10 +36,9 @@ module DataMapper
 
       def get_children(parent)
         query = child_key.to_query(parent_key.get(parent))
-        query.merge!({:order =&gt; @child_order}) if @child_order
         
         DataMapper.repository(parent.repository.name) do
-          child_model.all(query)
+          child_model.all(query.merge(@query))
         end
       end
 
@@ -47,7 +46,7 @@ module DataMapper
         query = parent_key.to_query(child_key.get(child))
 
         DataMapper.repository(repository_name) do
-          parent_model.first(query)
+          parent_model.first(query.merge(@query))
         end
       end
 
@@ -83,15 +82,13 @@ module DataMapper
           raise ArgumentError, &quot;+parent_properties+ must be an Array or nil, but was #{parent_properties.class}&quot;, caller unless Array === parent_properties
         end
         
-        if child_order = options[:order]
-          raise ArgumentError, &quot;+child_order+ must be an Array or nil, but was #{child_order.class}&quot;, caller unless Array === child_order
-        end
+        query = options.reject{ |key,val| [:class_name, :child_key, :parent_key, :min, :max].include?(key) }
 
         @name              = name
         @repository_name   = repository_name
         @child_model_name  = child_model_name
         @child_properties  = child_properties   # may be nil
-        @child_order       = child_order        # may be nil
+        @query             = query
         @parent_model_name = parent_model_name
         @parent_properties = parent_properties  # may be nil
         @loader            = loader</diff>
      <filename>lib/data_mapper/associations/relationship.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6160981583de998b75d7ae925c1864c77370e176</id>
    </parent>
  </parents>
  <author>
    <name>Sindre Aarsaether</name>
    <email>sindre@identu.no</email>
  </author>
  <url>http://github.com/sam/dm-core/commit/1c7c5ba4893a9d19b3b84e95bb3f6f92de00f802</url>
  <id>1c7c5ba4893a9d19b3b84e95bb3f6f92de00f802</id>
  <committed-date>2008-05-14T18:08:25-07:00</committed-date>
  <authored-date>2008-05-14T18:08:25-07:00</authored-date>
  <message>fixed associations to send options through to query</message>
  <tree>d086b2ddb75adad02f00ffb91eb61cc4941a8029</tree>
  <committer>
    <name>Sindre Aarsaether</name>
    <email>sindre@identu.no</email>
  </committer>
</commit>
