<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -399,7 +399,7 @@ class SCAR_Generic implements Iterator {
     }
     
     /**
-     * looks at criteria to determine if a givnn object can have a parent
+     * looks at criteria to determine if a given object can have a parent
      * @return boolean
      **/
     public function hasParent() {
@@ -455,8 +455,7 @@ class SCAR_Generic implements Iterator {
      * @return SCAR_Generic
      **/
     public function save() {
-        $this-&gt;doSQL();
-        return $this;
+        return $this-&gt;doSQL();
     }
 
 
@@ -697,7 +696,6 @@ class SCAR_Generic implements Iterator {
         if ($this-&gt;whoAmI()) {
             return true;
         }
-        
         // update
         if (count($this-&gt;getSet()) &gt; 0 &amp;&amp; $this-&gt;whoAmI()) {
             return $this-&gt;doSQLUpdate();
@@ -778,7 +776,7 @@ class SCAR_Generic implements Iterator {
                 $set[$set_piece['col']] = $set_piece['value'];
             }
 
-            foreach($this-&gt;getPrimaryKey() as $pk) {
+            foreach($klass-&gt;getPrimaryKey() as $pk) {
                 if (isset($set[$pk])) {
                     $klass_method = Inflector::byMethodize($pk);
                     $klass-&gt;$klass_method($set[$pk]);
@@ -788,9 +786,11 @@ class SCAR_Generic implements Iterator {
                     $klass-&gt;$klass_method($id);
                 }
             }
-            
+
+            $klass = $klass-&gt;current();
+
             // return a current iteration of the class
-            return $klass-&gt;current();
+            return $klass;
         }
         
         return false;</diff>
      <filename>lib/scargeneric.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5461f8895d3e4f04b565c0c7bfd96f408001a856</id>
    </parent>
  </parents>
  <author>
    <name>Jakob Heuser</name>
    <email>jakob@felocity.org</email>
  </author>
  <url>http://github.com/Jakobo/scar/commit/1e4a63726009ea3bcb70cf105c51e7d27591cf38</url>
  <id>1e4a63726009ea3bcb70cf105c51e7d27591cf38</id>
  <committed-date>2009-05-21T12:04:08-07:00</committed-date>
  <authored-date>2009-05-21T12:04:08-07:00</authored-date>
  <message>minor bug fix to improve objects returned on insert</message>
  <tree>2b7e20c0a8e8f042a77c6c20cc254254228bf461</tree>
  <committer>
    <name>Jakob Heuser</name>
    <email>jakob@felocity.org</email>
  </committer>
</commit>
