<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/more/grapher.rb</filename>
    </added>
    <added>
      <filename>scratch/grapher_demo.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,4 @@
+graphs
 pkg
 .irb_history
 uuid.state</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -29,6 +29,7 @@ require 'relaxdb/uuid_generator'
 require 'relaxdb/view_object'
 require 'relaxdb/view_uploader'
 require 'relaxdb/views'
+require 'more/grapher.rb'
 
 module RelaxDB
 end</diff>
      <filename>lib/relaxdb.rb</filename>
    </modified>
    <modified>
      <diff>@@ -128,9 +128,11 @@ module RelaxDB
     # permanent fixture of RelaxDB, but quite likely in a different form to this one
     def add_denormalised_data(data, relationship, opts)
       obj = send(relationship)
-      opts[:denormalise].each do |prop_name|
-        val = obj.send(prop_name)
-        data[&quot;#{relationship}_#{prop_name}&quot;] = val
+      if obj
+        opts[:denormalise].each do |prop_name|
+          val = obj.send(prop_name)
+          data[&quot;#{relationship}_#{prop_name}&quot;] = val
+        end
       end
     end
     </diff>
      <filename>lib/relaxdb/document.rb</filename>
    </modified>
    <modified>
      <diff>@@ -97,11 +97,7 @@ module RelaxDB
     end
         
     def create_from_hash(data)
-      @objects = []
-      data[&quot;rows&quot;].each do |row|
-        @objects &lt;&lt; create_object(row[&quot;value&quot;])
-      end
-      @objects      
+      data[&quot;rows&quot;].map { |row| create_object(row[&quot;value&quot;]) }
     end
   
     def create_object(data)</diff>
      <filename>lib/relaxdb/relaxdb.rb</filename>
    </modified>
    <modified>
      <diff>@@ -28,6 +28,7 @@ Gem::Specification.new do |s|
    &quot;lib/relaxdb/view_object.rb&quot;,
    &quot;lib/relaxdb/view_uploader.rb&quot;,
    &quot;lib/relaxdb/views.rb&quot;,
+   &quot;lib/more/grapher.rb&quot;,
    &quot;lib/relaxdb.rb&quot;,
    &quot;spec/belongs_to_spec.rb&quot;,
    &quot;spec/callbacks_spec.rb&quot;,</diff>
      <filename>relaxdb.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,10 @@ describe RelaxDB::Document, &quot;denormalisation&quot; do
       obj = JSON.parse(leaf.to_json)
       obj[&quot;tree_name&quot;].should == &quot;sapling&quot;
     end
+
+    it &quot;should ignore denormalised options for nil properties&quot; do
+      Leaf.new.to_json
+    end
     
     it &quot;should not interfere with normal belongs_to behaviour&quot; do
       tree = Tree.new(:name =&gt; &quot;sapling&quot;, :climate =&gt; &quot;tropical&quot;).save</diff>
      <filename>spec/denormalisation_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8e812635d7f70e748ea829e3714650a279f70f88</id>
    </parent>
  </parents>
  <author>
    <name>Paul Carey</name>
    <email>paul.p.carey@gmail.com</email>
  </author>
  <url>http://github.com/paulcarey/relaxdb/commit/cd63e0d51a293cd578523de2e8f9dec472203853</url>
  <id>cd63e0d51a293cd578523de2e8f9dec472203853</id>
  <committed-date>2008-09-11T15:16:42-07:00</committed-date>
  <authored-date>2008-09-11T15:16:42-07:00</authored-date>
  <message>Added graph creator and example. Minor denormalisation fix.</message>
  <tree>aa9ad8b92ef3224a25a0f98f214a3ba8acd5d5b4</tree>
  <committer>
    <name>Paul Carey</name>
    <email>paul.p.carey@gmail.com</email>
  </committer>
</commit>
