diff -uBb --exclude=config.php --exclude=.svn /tmp/activerecord/ActiveRecord.php /home/pkuijv/public_html/petje/inc/classes/activerecord/ActiveRecord.php
--- /tmp/activerecord/ActiveRecord.php	2008-07-10 15:06:48.000000000 +0200
+++ /home/pkuijv/public_html/petje/inc/classes/activerecord/ActiveRecord.php	2008-07-11 09:46:07.000000000 +0200
@@ -1,11 +1,11 @@
 <?php
-require_once 'BelongsTo.php';
-require_once 'HasMany.php';
-require_once 'HasOne.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'BelongsTo.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'HasMany.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'HasOne.php';
 if (!class_exists('Inflector'))
-  require_once 'inflector.php';
-require_once 'config.php';
-require_once dirname(__FILE__) . '/db_adapters/'.AR_ADAPTER.'.php';
+  require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'inflector.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'db_adapters' . DIRECTORY_SEPARATOR . AR_ADAPTER.'.php';
 class ActiveRecord {
 
   protected $columns       = array();
@@ -74,8 +74,8 @@
     }
 
     if (in_array($name, $this->columns)) {
+      if($this->attributes[$name] !== $value) $this->is_modified = true;
       $this->attributes[$name] = $value;
-      $this->is_modified = true;
     }
     elseif ($value instanceof Association) {
       /* call from constructor to setup association */
diff -uBb --exclude=config.php --exclude=.svn /tmp/activerecord/Association.php /home/pkuijv/public_html/petje/inc/classes/activerecord/Association.php
--- /tmp/activerecord/Association.php	2008-07-10 15:06:48.000000000 +0200
+++ /home/pkuijv/public_html/petje/inc/classes/activerecord/Association.php	2008-07-22 15:19:30.000000000 +0200
@@ -1,6 +1,6 @@
 <?php
 if (!class_exists('Inflector'))
-  require_once 'inflector.php';
+  require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'inflector.php';
 class Association {
   protected $dest_class;
   protected $source_class;
@@ -11,6 +11,8 @@
     $this->source_class = get_class($source);
     $this->dest_class = Inflector::classify($dest);
     $this->options = $options;
+    if (!class_exists($this->dest_class)) 
+	    require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $this->dest_class . '.php');
   }
 
   function needs_saving() {
diff -uBb --exclude=config.php --exclude=.svn /tmp/activerecord/BelongsTo.php /home/pkuijv/public_html/petje/inc/classes/activerecord/BelongsTo.php
--- /tmp/activerecord/BelongsTo.php	2008-07-10 15:06:48.000000000 +0200
+++ /home/pkuijv/public_html/petje/inc/classes/activerecord/BelongsTo.php	2008-07-11 09:47:08.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-require_once 'Association.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Association.php';
 class BelongsTo extends Association {
   function __construct(&$source, $dest, $options=null) {
     parent::__construct($source, $dest, $options);
diff -uBb --exclude=config.php --exclude=.svn /tmp/activerecord/HasMany.php /home/pkuijv/public_html/petje/inc/classes/activerecord/HasMany.php
--- /tmp/activerecord/HasMany.php	2008-07-10 15:06:48.000000000 +0200
+++ /home/pkuijv/public_html/petje/inc/classes/activerecord/HasMany.php	2008-07-11 09:47:17.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-require_once 'Association.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Association.php';
 class HasMany extends Association {
   function __construct(&$source, $dest, $options=null) {
     parent::__construct($source, $dest, $options);
diff -uBb --exclude=config.php --exclude=.svn /tmp/activerecord/HasOne.php /home/pkuijv/public_html/petje/inc/classes/activerecord/HasOne.php
--- /tmp/activerecord/HasOne.php	2008-07-10 15:06:48.000000000 +0200
+++ /home/pkuijv/public_html/petje/inc/classes/activerecord/HasOne.php	2008-07-11 09:47:23.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-require_once 'Association.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Association.php';
 class HasOne extends Association {
   function __construct(&$source, $dest, $options=null) {
     parent::__construct($source, $dest, $options);
Common subdirectories: /tmp/activerecord/Zend and /home/pkuijv/public_html/petje/inc/classes/activerecord/Zend
Common subdirectories: /tmp/activerecord/db_adapters and /home/pkuijv/public_html/petje/inc/classes/activerecord/db_adapters
diff -uBb --exclude=config.php --exclude=.svn /tmp/activerecord/generate.php /home/pkuijv/public_html/petje/inc/classes/activerecord/generate.php
--- /tmp/activerecord/generate.php	2008-07-10 15:06:48.000000000 +0200
+++ /home/pkuijv/public_html/petje/inc/classes/activerecord/generate.php	2008-07-11 09:47:36.000000000 +0200
@@ -1,6 +1,5 @@
 <?php
-
-require_once 'ActiveRecord.php';
+require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ActiveRecord.php';
 
 $is_web_request = ($_SERVER['HTTP_HOST']) ? true : false;
 $stub_models_dir = dirname(dirname(__FILE__)) .DIRECTORY_SEPARATOR;
