In Beforesave Integer Becomes Boolean While Saving

Hi all,

I am facing a problem, that in my beforeSave function when the data first time in validation, It will create no problem,

But when we come to next time as data come foe the save, the values of the model attributes become 0.

And datatype of the attribute changes from integer to boolean and data could not be saved.

I am not able to figure it out.

Please help.

You should post your model here.