what is the best way of checking if two model instances are equal (all attributes have exactly the same values, maybe with the exception of the primary key (it may be e.g. null in one case))
Page 1 of 1
model instances equality
#2
Posted 15 April 2010 - 04:41 AM
default method is:
but you can override it to check attributes (using array_diff function)
$someModel->equals( $anotherModel );
but you can override it to check attributes (using array_diff function)
-
-
Thanks, you make me stronger!
-Thanks, you make me stronger!
Share this topic:
Page 1 of 1

Help











