Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:kanshin/CakeEntity

  • Loading branch information...
commit ee8a2a367163b2ee3849d3f3eb4fbab2cf4a8edb 2 parents 107d5eb + 99c2e2f
@basuke basuke authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 models/entity.php
View
8 models/entity.php
@@ -45,6 +45,14 @@ public function init(EntityModel $model, $data) {
}
}
+ public function isEqual($other) {
+ if (!$other) return false;
+ if (empty($other->id)) return false;
+ if (get_class($other) != get_class($this)) return false;
+
+ return strval($other->id) == strval($this->id);
+ }
+
public function getModel() {
return ClassRegistry::init($this->_name_);
}
Please sign in to comment.
Something went wrong with that request. Please try again.