accountNumber, beneficiaryName, bankId. I have overridden the toDriver implementation to try and handle insertion of this custom type as follows:payment_config.beneficiary_account. The problem occurs when the column is defined as an array of that type, i.e. allowedBeneficiaries: beneficiaryAccount('allowed_beneficiaries').array() which means the column type is payment_config.beneficiary_account[].BeneficiaryAccount, the data does not serialise correctly and the resultant error is malformed record literal: "[object Object]". An example query that is produced is allowedBeneficiaries: BeneficiaryAccount[] is not being converted correctly. toDriver implementation to return a string (e.g. (${accountNumber},${beneficiaryName},${bankId}), then it works, except in the cases where there are special characters that need to be escaped (e.g. ").