MeikelLP / quantum-core-x

Metin2 open source server implementation
https://meikellp.github.io/quantum-core-x/
Mozilla Public License 2.0
42 stars 9 forks source link

Dropping an item from inventory causes foreign key constraint violation #167

Closed uutkukorkmaz closed 1 month ago

uutkukorkmaz commented 1 month ago
[ERR]An exception occurred in the database while saving changes for context type 'QuantumCore.Game.Persistence.MySqlGameDbContext'.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> MySqlConnector.MySqlException (0x80004005): Cannot add or update a child row: a foreign key constraint fails (`metin2`.`Items`, CONSTRAINT `FK_Items_Players_PlayerId` FOREIGN KEY (`PlayerId`) REFERENCES `Players` (`Id`) ON DELETE CASCADE)
   at MySqlConnector.Core.ServerSession.ReceiveReplyAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 894
[...]
   --- End of inner exception stack trace ---
[...]