codeledge / ra-tools

React Admin Tools, namely the Prisma Data Adapter
66 stars 19 forks source link

defaultHandler doesn't support array fields #34

Closed bradchoate closed 2 years ago

bradchoate commented 2 years ago

MongoDB has support for array fields, but the defaultHandler presumes an array value is only used for updating foreign key relationships. I would just recommend doing something like this for the array case:

if (foreignConnectKey) {
    ...existing code...
} else {
    fields[key] = value;
}
martin-fv commented 2 years ago

Yes, we will work on it soon. Meanwhile free free to open a PR.