<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>scratch/key_query_demo.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -114,6 +114,7 @@ module RelaxDB
     #
     # Examples:
     #   RelaxDB.load &quot;foo&quot;, :conflicts =&gt; true
+    #   RelaxDB.load &quot;foo&quot;, :revs =&gt; true
     #   RelaxDB.load [&quot;foo&quot;, &quot;bar&quot;]
     #
     def load(ids, atts={})</diff>
      <filename>lib/relaxdb/relaxdb.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ module RelaxDB
       map = &lt;&lt;-QUERY
       function(doc) {
         var class_match = #{kls_check kls}
-        if(class_match &amp;&amp; #{prop_check}) {
+        if (class_match &amp;&amp; #{prop_check}) {
           emit(#{key}, doc);
         }
       }
@@ -39,7 +39,7 @@ module RelaxDB
     def self.has_n(client_class, relationship, target_class, relationship_to_client)
       map = &lt;&lt;-QUERY
         function(doc) {
-          if(doc.relaxdb_class == &quot;#{target_class}&quot; &amp;&amp; doc.#{relationship_to_client}_id)
+          if (doc.relaxdb_class == &quot;#{target_class}&quot; &amp;&amp; doc.#{relationship_to_client}_id)
             emit(doc.#{relationship_to_client}_id, doc);
         }
       QUERY
@@ -51,7 +51,7 @@ module RelaxDB
     def self.references_many(client_class, relationship, target_class, peers)
       map = &lt;&lt;-QUERY
         function(doc) {
-          if(doc.relaxdb_class == &quot;#{target_class}&quot; &amp;&amp; doc.#{peers}) {
+          if (doc.relaxdb_class == &quot;#{target_class}&quot; &amp;&amp; doc.#{peers}) {
             var i;
             for(i = 0; i &lt; doc.#{peers}.length; i++) {
               emit(doc.#{peers}[i], doc);</diff>
      <filename>lib/relaxdb/views.rb</filename>
    </modified>
    <modified>
      <diff>@@ -165,11 +165,19 @@ describe RelaxDB::Document do
 
   describe &quot;user defined property writer&quot; do
     
-    it &quot;should not be used&quot; do
+    it &quot;should not be used to modify state&quot; do
       o = BespokeWriter.new(:val =&gt; 101).save
       o = RelaxDB.load o._id
       o.val.should == 81
     end
+    
+    it &quot;may be used if effectively idempotent&quot; do
+      o = BespokeWriter.new(:tt =&gt; &quot;2009/04/01&quot;).save
+      RelaxDB.reload(o).tt.should == Time.parse(&quot;2009/04/01&quot;)
+      
+      o = BespokeWriter.new(:tt =&gt; Time.now).save
+      RelaxDB.reload(o).tt.should be_close(Time.now, 1)
+    end
         
   end
   
@@ -254,8 +262,7 @@ describe RelaxDB::Document do
     end
   
     it &quot;should return an empty array when no instances exist&quot; do
-      Atom.all.should be_an_instance_of(Array)
-      Atom.all.should be_empty
+      Atom.all.should == []
     end
     
   end</diff>
      <filename>spec/document_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -217,8 +217,9 @@ describe RelaxDB do
       ns = (0...100).map { rand(1_000_000_000).to_s }
       objs = ns.map { |n| Primitives.new :_id =&gt; n }
       RelaxDB.bulk_save! *objs
+      ns = ns.reverse
       objs = RelaxDB.load! ns
-      (0...100).each do |i|
+      99.downto(0) do |i|
         ns[i].should == objs[i]._id
       end
     end
@@ -249,7 +250,7 @@ describe RelaxDB do
     it &quot;should request a view and return an array&quot; do
       RelaxDB::DesignDocument.get(RelaxDB.dd).add_view(&quot;simple&quot;, &quot;map&quot;, map_func).save
       data = RelaxDB.view(&quot;simple&quot;)
-      data.should be_instance_of(Array)
+      data.should == []
     end
 
     it &quot;may accept query params&quot; do</diff>
      <filename>spec/relaxdb_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,7 +35,9 @@ end
 
 class BespokeWriter &lt; RelaxDB::Document
   property :val
+  property :tt
   def val=(v); @val = v - 10; end
+  def tt=(t); @tt = t.is_a?(String) ? Time.parse(t) : t; end
 end
 
 class Invite &lt; RelaxDB::Document</diff>
      <filename>spec/spec_models.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2e3bcf45ed732daf3d64ac51ac15ddb6fa139e70</id>
    </parent>
  </parents>
  <author>
    <name>Paul Carey</name>
    <email>paul.p.carey@gmail.com</email>
  </author>
  <url>http://github.com/paulcarey/relaxdb/commit/8cf5faded47500c967e227ede0393750bb0434e8</url>
  <id>8cf5faded47500c967e227ede0393750bb0434e8</id>
  <committed-date>2009-08-14T07:47:39-07:00</committed-date>
  <authored-date>2009-08-14T07:47:39-07:00</authored-date>
  <message>Minor misc changes.</message>
  <tree>9eb8c6a28ee55782c7cff9f385a140a252153275</tree>
  <committer>
    <name>Paul Carey</name>
    <email>paul.p.carey@gmail.com</email>
  </committer>
</commit>
