In our app we set a timestamp + userId pair when an entity is created, updated, or deleted - so for deletions, deletedAt and deletedById (a foreign key of the user table).
It would be great if createValue would allow us to set multiple fields when a record is deleted so both these could be set. Or alternatively, to keep the API backwards compatible, a createValues plural option could be added so the behaviour of the original option doesn't need to change.
+1 for this. This would allow us to have a proper unique compound constrain based on both isDeleted and deletedAt along with some other property like name.
In our app we set a timestamp + userId pair when an entity is created, updated, or deleted - so for deletions,
deletedAt
anddeletedById
(a foreign key of the user table).It would be great if
createValue
would allow us to set multiple fields when a record is deleted so both these could be set. Or alternatively, to keep the API backwards compatible, acreateValues
plural option could be added so the behaviour of the original option doesn't need to change.I'd imagine it being used something like this:
If this is of interest, I'd be happy having a crack at a PR?