View Full Version : Override Model.isEqual()
13 Apr 2012, 3:06 AM
My model class contains an array field. My problem is that, the standard Model-class doesn't recognize a set()-call with the same value, because the isEqual()-Method just uses the === operator.
Is it a good idea to overwrite the isEqual()-method? In the documentation it's marked with @private. What exactly does this annotation mean?
13 Apr 2012, 3:45 AM
I think your can override it for that specific model. But === does type comparison, isn't is possible to cast the input in the correct type?
Private means very often: 'not in the docs'. So you are not sure the function is still there with the next release. But this one I think you can override, no problem.
13 Apr 2012, 4:14 AM
Many thanks for your answer.
But === does type comparison, isn't is possible to cast the input in the correct type?
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.