In an API, I am using Deep save to update an object and related objects.
Saving new records works fine, but when I try to update a record by providing a “full” object including ___class and ___jsonclass columns, I get this error:
Error: Deep save exception. Column '___jsonclass' in table 'RelCo_Assessment' does not exists. All tables and columns must be present in the database before a transaction is executed.
I thought providing Deep save with a regular object was how it was supposed to work. Do I really need to get rid of these extra columns before using Deep save, or am I doing something wrong?
This is the block that fails:
And here is one object I am trying to update, with IDs redacted:
{
___jsonclass: 'RelCo_Assessment',
___class: 'RelCo_Assessment',
startedManager: 0,
ownerId: 'xxx',
completedEmployee: 0,
completedOwnSingle: 0,
completedOwnManager: 0,
uniqueCode: 'cf5ca043',
Rel_User: User{
___class: 'Users',
___jsonclass: 'Users',
lastLogin: null,
profileText: null,
firstname: 'Hans',
userStatus: 'EMAIL_CONFIRMATION_PENDING',
created: 1689156055637,
accountType: 'BACKENDLESS',
profileImage: null,
ownerId: 'xxx',
socialAccount: 'BACKENDLESS',
oAuthIdentities: null,
lastname: 'Hansen',
name: 'HansHansen',
blUserLocale: 'no',
numTokens: 0,
updated: 1689160963881,
email: 'egil+hans@egil.net',
objectId: 'xxx'
},
completedManager: 0,
sumEvaluated: 0,
startedColleague: 0,
numColleague: 0,
objectId: 'xxx',
numEmployee: 1,
created: 1689160371832,
completedColleague: 0,
startedEmployee: 0,
sumCompleted: 0,
numManager: 6,
allCompleted: false,
numOwnManager: 0,
sumAvailable: 5,
allStarted: false,
numOwnSingle: 1,
startedOwnManager: 0,
updated: null,
startedOwnSingle: 0,
sumStarted: 0
}