wixData.insert() inserting null into collection

Question:
wixData.insert() inserting null into collection (is_client_deleted is storing as null)

Product:
wix editor

What are you trying to achieve:
it should store value that I pass but storing null in is_client_deleted but working other values.

What have you already tried:
tried values : 0, false,1,true

Additional information:
here is my code snippet

 let toInsert = {
                safeId: data.safeId,
        
                bucketName: data.bucketName,
                is_client_deleted: 0,
                isActive: 1,
            
                client_id: clientId,
            };

            return wixData.insert(
                collectionIdsArray.safeFile,
                toInsert,
                suppressAuthArray
            );

Are you able to explain a little more about the setup? Is this using the Wix CMS or an external DB?

And which field type are you using?

I am using external db with aws-setup
i am using boolean data type , not null, default false (but mysql takes as tinyint(1))

Try these

Explicitly pass a JavaScript boolean value instead of a boolean. Wix Data might be stricter
about type coercion when interfacing with an external database.

let toInsert = {
    safeId: data.safeId,
    bucketName: data.bucketName,
    is_client_deleted: false,
    isActive: true, 
    client_id: clientId,
};
return wixData.insert(collectionIdsArray.safeFile, toInsert, suppressAuthArray);

  1. Double-check that the field name is_client_deleted in your toInsert object matches the exact column name in your Wix Data collection and MySQL table.
    Verify the column name in your MySQL schema and Wix collection configuration. For example, if the MySQL column is isClientDeleted , adjust your code accordingly

  2. Ensure the field is always included in the toInsert object with a valid value. You can also log the toInsert object before the insert to confirm its contents:

console.log("toInsert:", toInsert);
return wixData.insert(collectionIdsArray.safeFile, toInsert, suppressAuthArray);
  1. Varify if the values are being passed via debug
return wixData.insert(collectionIdsArray.safeFile, toInsert, suppressAuthArray)
    .then((result) => {
        console.log("Insert successful:", result);
    })
    .catch((error) => {
        console.error("Insert failed:", error);
    });

thank you for your solutions and help but that was didn’t worked for me. I have tried this and worked

let toInsert = {
safeId: data.safeId,
bucketName: data.bucketName,
is_client_deleted: ‘0’,
isActive: true,
client_id: clientId,
};