<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,8 +2,8 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
 
 describe &quot;Koios::Relationship&quot; do
 
-  describe &quot;#has h&quot; do
-    model :Owner do |sql|
+  describe &quot;#has n&quot; do
+    model :Owner do
       has n, :things, &quot;Thing&quot;
     end
 
@@ -13,7 +13,7 @@ describe &quot;Koios::Relationship&quot; do
     end
 
     before :all do
-      6.times do |i|
+      6.times do
         o = Owner.create
         6.times { |i| Thing.create :owner_id =&gt; o.id, :age =&gt; 2 * i }
       end
@@ -36,4 +36,26 @@ describe &quot;Koios::Relationship&quot; do
     end
   end
 
+  describe &quot;#has n (self referencing)&quot; do
+    model :Thing do
+      property :thing_id, Integer
+      property :age,      Integer
+      has n, :things, &quot;Thing&quot;
+    end
+
+    before :all do
+      @expected = []
+      6.times do |x|
+        t = Thing.create
+        6.times do |i|
+          thing = Thing.create :thing_id =&gt; t.id, :age =&gt; 2 * i
+          @expected &lt;&lt; thing if x == 0
+        end
+      end
+
+      @relation = Thing.get(1).things
+    end
+
+    it_should_behave_like 'A public Relation'
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/public/relationships/has_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,6 +37,42 @@ describe &quot;Koios::Relationship&quot; do
     it_should_behave_like 'A public Relation'
   end
 
+  describe &quot;has n, :through (self referencing)&quot; do
+    model :Owner do
+      has n, :foos,   &quot;Thing&quot;
+      has n, :things, :through =&gt; :foos
+    end
+
+    model :Thing do
+      property :owner_id, Integer
+      property :thing_id, Integer
+      property :age,      Integer
+      has n, :things
+    end
+
+    before :all do
+      @expected = []
+      2.times do |x|
+        o = Owner.create
+        6.times do |y|
+          t = Thing.create :owner_id =&gt; o.id
+          6.times do |i|
+            thing = Thing.create :thing_id =&gt; t.id, :age =&gt; 2 * i
+            @expected &lt;&lt; thing if x == 0 &amp;&amp; y == 0
+          end
+        end
+      end
+
+      @relation = Owner.get(1).things
+    end
+
+    it &quot;should work&quot; do
+      pending &quot;This is currently broken&quot;
+    end
+
+    # it_should_behave_like 'A public Relation'
+  end
+
   describe &quot;has n, :through many&quot; do
     model :Owner do
       has n, :foos</diff>
      <filename>spec/public/relationships/has_through_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a955c3b37cd3ec80dffd2675e3c2a69632f061e1</id>
    </parent>
  </parents>
  <author>
    <name>Carl Lerche</name>
    <email>carllerche@mac.com</email>
  </author>
  <url>http://github.com/carllerche/koios/commit/9aa2db590665b6337e9bb85fbf380e5a2e945473</url>
  <id>9aa2db590665b6337e9bb85fbf380e5a2e945473</id>
  <committed-date>2009-11-02T22:48:10-08:00</committed-date>
  <authored-date>2009-11-02T22:48:10-08:00</authored-date>
  <message>Added some self referencing has through specs.</message>
  <tree>2b8a0840df16d179c14e032571cdfcc1975e6cb0</tree>
  <committer>
    <name>Carl Lerche</name>
    <email>carllerche@mac.com</email>
  </committer>
</commit>
