<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -165,6 +165,19 @@ if ADAPTER
       belongs_to :parent, :class_name =&gt; 'Node', :child_key =&gt; [ :parent_id ]
     end
 
+    class MadeUpThing
+      include DataMapper::Resource
+
+      def self.default_repository_name
+        ADAPTER
+      end
+
+      property :id, Serial
+      property :name, String
+      belongs_to :area
+      belongs_to :machine
+    end
+
     module Models
       class Project
         include DataMapper::Resource
@@ -227,6 +240,7 @@ if ADAPTER
 
       belongs_to :galaxy
     end
+
   end
 
   describe DataMapper::Associations do
@@ -274,6 +288,7 @@ if ADAPTER
       before do
         Machine.auto_migrate!(ADAPTER)
         Area.auto_migrate!(ADAPTER)
+        MadeUpThing.auto_migrate!(ADAPTER)
 
         machine1 = Machine.create(:name =&gt; 'machine1')
         machine2 = Machine.create(:name =&gt; 'machine2')
@@ -299,7 +314,7 @@ if ADAPTER
       end
 
       it 'should save both the object and parent if both are new' do
-        pending &quot;This is fixed&quot;
+        pending &quot;This is a bug that should be fixed&quot;
         area1 = Area.new(:name =&gt; 'area1')
         area1.machine = Machine.new(:name =&gt; 'machine1')
         area1.machine.save
@@ -338,6 +353,17 @@ if ADAPTER
         Area.new(:machine =&gt; machine).machine_id.should == machine.id
       end
 
+      it &quot;should be able to set an association obtained from another association&quot; do
+        pending &quot;This is a bug that should be fixed&quot;
+        machine1 = Machine.first(:name =&gt; 'machine1')
+        area1 = Area.first(:name =&gt; 'area1')
+
+        m = MadeUpThing.create(:machine =&gt; machine1, :area =&gt; area1.machine, :name =&gt; &quot;Weird&quot;)
+
+        m.machine_id.should == machine1.id
+        m.area_id.should == area1.machine.id
+      end
+
       it 'should save the parent upon saving of child' do
         e = Machine.new(:name =&gt; 'machine10')
         y = Area.create(:name =&gt; 'area10', :machine =&gt; e)</diff>
      <filename>spec/integration/association_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e53d54696e4d8d5e62fde6284999b44b5496b7ec</id>
    </parent>
  </parents>
  <author>
    <name>Dirkjan Bussink</name>
    <email>d.bussink@gmail.com</email>
  </author>
  <url>http://github.com/sam/dm-core/commit/5fb1ed1547d586427cdab92cfafd8a1f58242acd</url>
  <id>5fb1ed1547d586427cdab92cfafd8a1f58242acd</id>
  <committed-date>2008-07-24T12:57:55-07:00</committed-date>
  <authored-date>2008-07-24T12:57:55-07:00</authored-date>
  <message>Spec that shows a bug in associations</message>
  <tree>deddf124cd7675bd28fccbc42fa6a6789b0a0c29</tree>
  <committer>
    <name>Dirkjan Bussink</name>
    <email>d.bussink@gmail.com</email>
  </committer>
</commit>
