<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>tests/integration/associations/one_to_many_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -16,7 +16,7 @@ module Clipper
       field
     end
 
-    attr_reader :signatures, :accessors, :types, :name, :fields, :target
+    attr_reader :signatures, :accessors, :types, :name, :fields, :target, :associations
 
     def initialize(repository, target, name)
       unless repository.is_a?(Clipper::Repository) &amp;&amp; target.is_a?(Class) &amp;&amp; name.is_a?(String)</diff>
      <filename>lib/clipper/mapping.rb</filename>
    </modified>
    <modified>
      <diff>@@ -97,7 +97,7 @@ module Clipper
 
           new_value.each do |item|
             association.set_key(self, item)
-            self.__session__.enlist(item) if self.__session__
+            __session__.enlist(item) if self.__session__
           end
 
           instance_variable_set(association.instance_variable_name, OneToManyCollection.new(association, self, new_value))</diff>
      <filename>lib/clipper/mapping/associations/one_to_many.rb</filename>
    </modified>
    <modified>
      <diff>@@ -115,7 +115,6 @@ module Clipper
           serial_key = mapping.keys.detect { |field| field.type.is_a?(self.class::Types::Serial) }
 
           collection.each do |object|
-
             values = session.unit_of_work.proxy_for(object).dirty_values
 
             statement = &quot;INSERT INTO #{quote_identifier(collection.mapping.name)} &quot;</diff>
      <filename>lib/clipper/repositories/jdbc.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,13 +33,13 @@ module Clipper
       # Add CREATE ZooKeeper
       @work_orders &lt;&lt; new_work_order
 
-#      @session.mappings[object.class].associations.each do |association|
-#        if association.is_a?(Clipper::Mappings::OneToMany)
-#          association.get(object).each do |associated_object|
-#            @session.enlist(associated_object)
-#          end
-#        end
-#      end
+      @session.mappings[object.class].associations.each do |association|
+        if association.is_a?(Clipper::Mapping::OneToMany)
+          association.get(object).each do |associated_object|
+            @session.enlist(associated_object)
+          end
+        end
+      end
 #
 #      @session.mappings[object.class].associations.each do |association|
 #        if association.is_a?(Clipper::Mappings::ManyToMany)
@@ -101,17 +101,16 @@ module Clipper
 
           @session.repository.send(work_order[0], collection, @session)
 
-#          @session.mappings[work_order[1].class].associations.each do |association|
-#            next unless association.is_a?(Clipper::Mappings::OneToMany)
-#
-#            # Since we just created the instance, we need to ensure that all associated items know about
-#            # the new parent key
-#            collection.each do |instance|
-#              association.get(instance).each do |associated_instance|
-#                association.set_key(instance, associated_instance)
-#              end
-#            end
-#          end
+          @session.mappings[work_order[1].class].associations.each do |association|
+            next unless association.is_a?(Clipper::Mapping::OneToMany)
+            # Since we just created the instance, we need to ensure that all associated items know about
+            # the new parent key
+            collection.each do |instance|
+              association.get(instance).each do |associated_instance|
+                association.set_key(instance, associated_instance)
+              end
+            end
+          end
 
         when :delete then
           collection = work_order[1].is_a?(Collection) ? work_order[1] : Collection.new(@session.mappings[work_order[1].class], [work_order[1]].flatten)</diff>
      <filename>lib/clipper/unit_of_work.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>burn/tests/integration/associations/one_to_many_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>c70de8732a091681cc9ded8b88e2a04f6f6d7147</id>
    </parent>
  </parents>
  <author>
    <name>Fabio Rehm</name>
    <email>fgrehm@gmail.com</email>
  </author>
  <url>http://github.com/wiecklabs/clipper/commit/2ae886f71bbafbb191065228d78927c7ee3e3ef8</url>
  <id>2ae886f71bbafbb191065228d78927c7ee3e3ef8</id>
  <committed-date>2009-09-22T20:26:46-07:00</committed-date>
  <authored-date>2009-09-22T20:26:46-07:00</authored-date>
  <message>Handling one-to-many associations. Still pending unlinking associated objects when setting collection on parent.</message>
  <tree>68e60258d382c828040f0e7f782688e452ab2311</tree>
  <committer>
    <name>Fabio Rehm</name>
    <email>fgrehm@gmail.com</email>
  </committer>
</commit>
