def hasSameValues(self, other, cascadeObject=True):
if self.FIELDS != other.FIELDS:<EOL><INDENT>return False<EOL><DEDENT>oga = object.__getattribute__<EOL>for field in self.FIELDS:<EOL><INDENT>thisVal = oga(self, field)<EOL>otherVal = oga(other, field)<EOL>if thisVal != otherVal:<EOL><INDENT>return False<EOL><DEDENT>if cascadeObject is True and issubclass(field.__class__, IRForeignLinkFieldBase):<EOL><INDENT>if thisVal and thisVal.isFetched():<EOL><INDENT>if otherVal and otherVal.isFetched():<EOL><INDENT>theseForeign = thisVal.getObjs()<EOL>othersForeign = otherVal.getObjs()<EOL>for i in range(len(theseForeign)):<EOL><INDENT>if not theseForeign[i].hasSameValues(othersForeign[i]):<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>theseForeign = thisVal.getObjs()<EOL>for i in range(len(theseForeign)):<EOL><INDENT>if theseForeign[i].hasUnsavedChanges(cascadeObjects=True):<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if otherVal and otherVal.isFetched():<EOL><INDENT>othersForeign = otherVal.getObjs()<EOL>for i in range(len(othersForeign)):<EOL><INDENT>if othersForeign[i].hasUnsavedChanges(cascadeObjects=True):<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>return True<EOL>
hasSameValues - Check if this and another model have the same fields and values.

This does NOT include id, so the models can have the same values but be different objects in the database.

@param other <IndexedRedisModel> - Another model

@param cascadeObject <bool> default True - If True, foreign link values with changes will be considered a difference.
        Otherwise, only the immediate values are checked.

@return <bool> - True if all fields have the same value, otherwise False