payload
payload copied to clipboard
fix(db-postgres): allow to clear select fields with `hasMany: true`
What?
Previously, using Postgres, select fields with hasMany: true
weren't clearable.
Meaning, you couldn't pass an empty array:
const updatedDoc = await payload.update({
id,
collection: 'select-fields',
data: {
selectHasMany: [],
},
})
Why?
To achieve the same behavior with MongoDB.
How?
Modifies logic in packages/drizzle/src/upsertRow/index.ts
to include empty arrays.