### What? Moved the logic for copying the data.id to data._id to the mongoose adapter. ### Why? If you have any hooks that need to set the `id`, the value does not get sent to mongodb as you would expect since it was copied before the beforeValidate hooks. ### How? Now data._id is assigned only in the mongodb adapter's `create` function. BREAKING CHANGES: When using custom ID fields, if you have any collection hooks for beforeValidate, beforeChange then `data._id` will no longer be assigned as this happens now in the database adapter. Use `data.id` instead.
14 KiB
14 KiB