Conversion failed when converting the varchar value 'NULL' to data type int


#1

I am currently having a application running on cakephp which was working without any problem with Mysql database but now I have changed the database to Microsoft Sql server 2014 and now when I am trying to update and User object it is showing me below error.

Conversion failed when converting the varchar value ‘NULL’ to data type int.

2018-04-13 01:48:20 Error: [PDOException] SQLSTATE[22018]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Conversion failed when converting the varchar value ‘NULL’ to data type int.
Request URL: /Cairn/Admin/Source/users/edit/8630
Stack Trace:
#0 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Model\Datasource\Database\Sqlserver.php(757): PDO->exec(‘UPDATE [aros] S…’)
_#1 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Model\Datasource\DboSource.php(426): Sqlserver->execute(‘UPDATE [aros] S…’, Array)
#2 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Model\Datasource\DboSource.php(1842): DboSource->execute(‘UPDATE [aros] S…’)
#3 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Model\Datasource\Database\Sqlserver.php(371): DboSource->update(Object(Aro), Array, Array, NULL)
#4 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Model\Model.php(1731): Sqlserver->update(Object(Aro), Array, Array)
#5 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Model\Behavior\AclBehavior.php(121): Model->save(Array)
#6 [internal function]: AclBehavior->afterSave(Object(User), false, Array)
#7 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Utility\ObjectCollection.php(132): call_user_func_array(Array, Array)
#8 [internal function]: ObjectCollection->trigger(Object(CakeEvent))
#9 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Event\CakeEventManager.php(248): call_user_func(Array, Object(CakeEvent))
#10 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Model\Model.php(1770): CakeEventManager->dispatch(Object(CakeEvent))
#11 E:\xampp\htdocs\Cairn\Admin\Source\app\Controller\UsersController.php(91): Model->save(Array)
#12 [internal function]: UsersController->edit(‘8630’)
#13 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Controller\Controller.php(486): ReflectionMethod->invokeArgs(Object(UsersController), Array)
#14 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Routing\Dispatcher.php(187): Controller->invokeAction(Object(CakeRequest))
_#15 E:\xampp\htdocs\Cairn\Admin\Source\lib\Cake\Routing\Dispatcher.php(162): Dispatcher->invoke(Object(UsersController), Object(CakeRequest), Object(CakeResponse))
#16 E:\xampp\htdocs\Cairn\Admin\Source\app\webroot\index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#17 {main}

Is this problem coming because of ACO, ARO tables?
I would be really thankful if somebody could help.