MySQL entry row get's deleted and re-entered on update

System Information
  • Strapi Version: 5.15.1
  • Operating System: windows 11 pro
  • Database: mysql
  • Node Version: node v22.12.0

Hi everyone,

I’ve run into a strange issue when updating records in my application. Every time I update an Order record, instead of modifying the existing entry, it seems to delete the old record (and all related data) and insert a new one with a new auto-incremented ID.

Here’s my data structure:

  • Order
    • summary
    • description
    • address (component)
  • Address
    • address
    • location

The IDs are set to auto-increment by default. What’s puzzling is:

  • Each update creates a new record with a new ID (and deletes the old one).
  • The related records (like the address) are deleted as well.
  • This behaviour only happens with the published records.
  • In the admin panel, the original ID stays visible until I restart the app.

Has anyone encountered this behavior before? Is there something I might be doing wrong in how updates are handled—possibly treating them like new inserts? Any insight or tips would be appreciated!

Thanks!