SoftwareBrothers / adminjs

AdminJS is an admin panel for apps written in node.js
https://adminjs.co
MIT License
8.15k stars 659 forks source link

[Bug]: (mongoose) Updating a document re-creates all subdocuments (createdAt timestamps are updated) #1552

Open dhbahr opened 1 year ago

dhbahr commented 1 year ago

Contact Details

No response

What happened?

Bug prevalence

Every time I update a parent document

AdminJS dependencies version


"dependencies": {
    "@adminjs/fastify": "^4.0.1",
    "@adminjs/import-export": "^3.0.0",
    "@adminjs/mongoose": "^4.0.0",
    "@aws-sdk/client-s3": "^3.373.0",
    "@fastify/auth": "^4.3.0",
    "@fastify/autoload": "^5.0.0",
    "@fastify/bearer-auth": "^9.0.0",
    "@fastify/cors": "^8.3.0",
    "@fastify/mongodb": "^7.0.0",
    "@fastify/sensible": "^5.0.0",
    "adminjs": "^7.0.9",
    "bcryptjs": "^2.4.3",
    "crypto-random-string": "^5.0.0",
    "fastify": "^4.18.0",
    "fastify-cli": "^5.7.1",
    "fastify-plugin": "^4.5.0",
    "mongoose": "^7.3.1",
    "nforce": "^1.13.0",
    "nforce-metadata": "^1.1.2"
  },
  "devDependencies": {
    "@istanbuljs/esm-loader-hook": "0.2.0",
    "husky": "^8.0.3",
    "standard": "^17.1.0",
    "tap": "^16.1.0"
  }...```

### What browsers do you see the problem on?

Chrome

### Relevant log output

_No response_

### Relevant code that's giving you issues

_No response_